#### Archived

This topic is now archived and is closed to further replies.

This topic is 5562 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I wrote a DLL in C++ and am trying to use it with Visual Basic. I have the DLL working I believe somewhat, but the values are really off and weird. An example of a function i'm trying to use is this.

int PAPYTELEMDAT_API LFO()
{
int w1;
const TireData			*td;

if ((td = (const TireData *) AppGetSimData(kTireData)) != NULL &&
{
}

w1 = TEMP(td->w[0].temp[0]);

return(w1);
}


in my Visual Basic program, i'm doing this,

Private Declare Function LFO Lib "Data.dll" () As Integer

I have the Visual Basic program take the DLL and use the value w1 and make it show up as a caption, however, this is not working properly, when i run the program text shows up in the boxes, but the values are very wrong and I have no idea where they came from. Any help is appreciated. [edited by - caffeineaddict on March 31, 2003 4:49:34 PM]

##### Share on other sites
One solution is COM.

Kuphryn

##### Share on other sites
i''m sorry, i don''t understand what you mean. How would i go about using it to fix it?

##### Share on other sites
i think an "int" in c/c++ is a "long" in VB...

Private Declare Function LFO Lib "Data.dll" () As Long

might work... sorry, but i haven''t installed VB since i reformatted, so i can''t check before i post...

• 11
• 20
• 12
• 10
• 38
• ### Forum Statistics

• Total Topics
631401
• Total Posts
2999864
×