Recently I am try to consuming a function from a dll.
In my program, i have input "00160001"
The program take in the value and pop out a message "00160001"
then the program call a function from a dll. Another popup message was trigger
this time the message is "ÌÌ00160001"
What is going on with my program?
ÌÌ00160001 only appear when i call the function from a dll?
Once I have received the input, I store value into a char[66] variable. And I converted it to _bstr_t.
I need to convert it so that I can store the value into a struct that is created by a colleague.
The value is correct throughout the source code in the .exe file that I have created, but however, the value changes once after I pass the value to a dll.
The code was quite long and messy. so is quite difficult for me to post it here.
The code was quite long and messy. so is quite difficult for me to post it here.
What we need here is the bit of code where the various variables are declared, where the function is called, where the char array is converted into a _bstr_t, and also how the function is declared. Plus anything else that's in the chain. e.g.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
char input[66];
// populate input somehow
struct MyStruct
{
_bstr_t value;
// other members
};
// etc
MyStruct ms;
ms.value = ???; // how is the conversion done?
// etc
dll_function(&ms);