Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Params from VB

Status
Not open for further replies.

DwaineC

MIS
Jan 6, 2003
40
0
0
US
I have a C++ .NET dll (not mfc or atl). Is there something I should know about sending a VB long and receiving in C++ as __int32? From VB.NET it works just fine, but not from VB. That is, I can convert the number (uint32) properly from VB.NET, but it returns a different number if passed from VB6. In fact, the number is the same no matter what I pass.

Also, in C++ if I pass a filename with full path from VB6, say "C:\TempDirectory\ThisDirectory\777777-1111B4.BMP", I want to extract the 777777 from this string. Unfortunately these backslashes (escape sequences) strip some of the numbers off and play havoc with my unbelieveable programming skills. Any ideas?

Much appreciated.
 
I sent the param as long from VB6 and received in C++ as __int32 and converted to (uint32). Now, isn't that what I said I was trying to do in my first post? I swear I tried every combination under the sun, but I must not have tried that because it worked the next day. That's what happens when we try to figure stuff out at the end of the day - the next morning, well, it's all good, as they say...

Dwaine
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top