|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Article Discussion: Your First COM Client In Visual C++
Your First COM Client In Visual C++ If you have any questions or comments about this article then please post them here.
You can read the article here . |
|
#2
|
|||
|
|||
|
sending a string to VB DLL
Hi,
This article was very good for me, but I don't how can I pass a string to VB. Your code doesn't show it. I ' m trying something like this : IN C++: { _bstr_t pato (L"gato"); pJBMenu->Insert_Description (pato); } IN VB DLL (class Menu): Public Function Insert_Description(ByVal desc As String) As Long On Error GoTo Fatal Dim g As String ' Insert a new description in the list FormStartup.Insert_Description (desc) Insert_Description = 1 Exit Function Fatal: MsgBox "ERRO " & Err.Description & " " & desc End Function The C++ program compiles, but breaks in this moment : pJBMenu->Insert_Description (pato); Could someone help me ? Thanks, Joao Araujo |
|
#3
|
|||
|
|||
|
Some mistakes
First a question:- where are the support files located?
Secondly, I found a bunch of small mistakes which you might like to correct: GetDlgItemText(IDC_CARDNO,cardtype); should read GetDlgItemText(IDC_CARDTYPE,cardtype); ValidateCard (num As String , type As String) As Long should read ValidateCard (ByVal num As String , ByVal cardtype As String) As Long otherwise VC++ thinks that the function expects unsigned shorts instead of BSTRs and also type is a reserved word using namespace Validate should read using namespace ValidateCard; |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > Article Discussion: Your First COM Client In Visual C++ |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|