-
January 11th, 2021, 11:27 AM
#1
Need to convert an INT to WORD*
I'm working with a third party software that only allows passing of Strings, Doubles, and Integers to the DLL that I'm attempting to write. The DLL(MyDLL) is being written to work as a wrapper around a DLL(OtherDLL) that the third party is unable to call. Some of the calls to OtherDLL require me to send a WORD* but I have no way of sending a WORD* directly from the third party software. I'm attempting to send a INT from the third party software and converting it to the WORD* type but it won't let me. I keep getting the following message from Visual Studio 2017: "'type cast': conversion from 'INT' to 'WORD *' of greater size".
Sample:
WORD *wpAddress;
INT nAddress;
wpAddress = (WORD*)nAddress; //type cast
Thanks,
George
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|