Jump to content
  • Advertisement

Archived

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

caffeineaddict

Please help with DLL

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

If you intended to correct an error in the post then please contact us.

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 &&
		!formatForSpreadsheet)
	{
	}


					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 this post


Link to post
Share on other sites
Advertisement
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...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!