Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
String Parameter
Message
From
12/04/2000 11:42:46
 
General information
Forum:
Visual Basic
Category:
ActiveX controls
Miscellaneous
Thread ID:
00358658
Message ID:
00358727
Views:
9
>Have you read this: http://support.microsoft.com/support/kb/articles/Q187/9/12.ASP?LNG=ENG&SA=ALLKB&FR=0

Hi Eric,

Thanks for responding.

I just read the article but it left me a little confused as to what I will need to do in my case. In order to create the COM type DLL I declared the string parameter as BSTR* on the C++ side. Other declarations such as LPSTR or char* would not compile presumably because the COM interface requires variant type parameter passing for which BSTR qualifies. I changed the declaration to BSTR and recompiled as a test and this also works with the VFP code but not the VB code.

I guess my confusion is since the C++ parameter is declared as BSTR already, what would need to be done on the VB side for it to pass correctly. The article shows the sample DLL invoked thru the "Declare ...( ByVal ... )" syntax which allows declaration of the method by which a parameter is passed. My understanding is that in the case of a COM DLL, the DLL functionality is invoked thru the "new" declaration or the Createobject() syntax, both of which specify no parameter declaration.

Bottom line is, I see the point being made in the article, but I'm confused as to how to apply it in my case.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform