Greetings,
I try to move a function which exist in my VB project over to a ATL project.
In VB my Function looks like
VB Code:
Public Function gstrCreateBarName(ByVal vstrPrivate As String, _ ByVal vstrFirma As String) As String If vstrFirma <> gvDUMMY_EINTRAG Then gstrCreateBarName = vstrPrivate & " ( " & vstrFirma & ")" Else gstrCreateBarName = vstrPrivate End If End Function
I tried the following approach in C++ but it will not work
VB Code:
STDMETHODIMP CTools::MakeBarName(BSTR Gast, BSTR Firma, BSTR *BarName) { // TODO: Add your implementation code here bstr_t bstrFirma = Firma; bstr_t bstrGast = Gast; if (BSTR(bstrFirma) != BSTR("-/-")) { BarName = "Gast + Firma"; } else { BarName = "Gast"; } return S_OK; }
any idea how I can the VB Function get over to C++
Many thanks in advance


Reply With Quote