String
-
Hi All. I´ve create a dual interface in VC++ with this method "void SegundoError([out] BSTR my_string)" in the events interface and with its corresponding Fire in the CProxi class. In VB I´ve capture this event: "MiInterface.SegundoError(ByVal string_from_VC As String" and the problem is that "string_from_VC" arrives empty. Cuold tell me someone what I´m doing wrong? Thanks:rose:
-
Hi All. I´ve create a dual interface in VC++ with this method "void SegundoError([out] BSTR my_string)" in the events interface and with its corresponding Fire in the CProxi class. In VB I´ve capture this event: "MiInterface.SegundoError(ByVal string_from_VC As String" and the problem is that "string_from_VC" arrives empty. Cuold tell me someone what I´m doing wrong? Thanks:rose:
Why did you define your string as [out]? Who is providing the string VB or VC? * if your string is defined in VB and you want to view it in VC, use [in] * if your string is returned to VB, then you should use [out] BSTR * pbstrOut Can you give me more details, please! Did you create your VC++ object using ATL? How do you create an instance inside VB? What is the code that you have in your VC++ function? You should realize that BSTRs are not like LPTSTR or TCHAR * so, inside your SegundoError: SegundoError(BSTR my_string) { USESCONVERSION; LPCTSTR psz = W2T(my_string); printf("String is : %s", psz); } Mh2!:)
-
Hi All. I´ve create a dual interface in VC++ with this method "void SegundoError([out] BSTR my_string)" in the events interface and with its corresponding Fire in the CProxi class. In VB I´ve capture this event: "MiInterface.SegundoError(ByVal string_from_VC As String" and the problem is that "string_from_VC" arrives empty. Cuold tell me someone what I´m doing wrong? Thanks:rose:
If you are trying to pass a string out from VC to VB using a connection point, the IDL should be [in]BSTR my_string Michael :-)
-
Hi All. I´ve create a dual interface in VC++ with this method "void SegundoError([out] BSTR my_string)" in the events interface and with its corresponding Fire in the CProxi class. In VB I´ve capture this event: "MiInterface.SegundoError(ByVal string_from_VC As String" and the problem is that "string_from_VC" arrives empty. Cuold tell me someone what I´m doing wrong? Thanks:rose: