Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
20 Views

How can I use the subroutine VFSetErrorInfo in a 64 bits enviroment

Hi, I created a COM server for 32 bit . This one works fine for a long time.
I now want to create the same one under 64 bit, and it doesn't link because of two errors

error LNK2019: unresolved external symbol _CreateErrorInfo@4 referenced in function VFSETERRORINFO
error LNK2019: unresolved external symbol _SetErrorInfo@8 referenced in function VFSETERRORINFO

These two externals were called from the subroutine VFSetErrorInfo.I believe this subroutine came with one the sample projects.

Does someone know how to change this subroutine?

Thanks Aid Usman

0 Kudos
1 Reply
Highlighted
20 Views

In the interface declarations for CreateErrorInfo and SetErrorInfo, modify the attribute directive to be this:

            !dec$ attributes stdcall, decorate, alias:"CreateErrorInfo" :: CreateErrorInfo

This removes the leading underscore and the trailing "@n" from the external name for Intel64.  And, DECORATE tells the compiler to put it on for IA-32.

                     --Lorri

 

 

0 Kudos