HI everyone,
I am calling a VB COM dll server method from a C++ client. The VB method takes an argument of type Byte. It's defined as such:
Now how I have to call this function from C++. After importing the dll into the C++ project the function is showing as this in the .tlh:
void myAverage(unsigned char* rate)
I can do this:
well, this compiles but I am not doing the right thing, because I am not passing the actual digit 2 to the function, I am passing the ASCII value of it, right? I am a bit confused here. Any commments appreciated.
I am calling a VB COM dll server method from a C++ client. The VB method takes an argument of type Byte. It's defined as such:
Code:
Public sub myAverage(ByVal rate as Byte)
Now how I have to call this function from C++. After importing the dll into the C++ project the function is showing as this in the .tlh:
void myAverage(unsigned char* rate)
I can do this:
Code:
unsigned char one = 2;
double two = 0.0;
two = myInterfacePointer->myAverage(&one);
well, this compiles but I am not doing the right thing, because I am not passing the actual digit 2 to the function, I am passing the ASCII value of it, right? I am a bit confused here. Any commments appreciated.