Click here to Skip to main content
15,895,370 members
Home / Discussions / COM
   

COM

 
GeneralRe: VS2008, MIDL compiler bug Pin
Gary Wheeler8-Jan-08 0:52
Gary Wheeler8-Jan-08 0:52 
GeneralRe: VS2008, MIDL compiler bug Pin
Mike Dimmick8-Jan-08 9:40
Mike Dimmick8-Jan-08 9:40 
GeneralRe: Calling ActiveX DLL from MFC - passing arrays Pin
mla1543-Jan-08 10:05
mla1543-Jan-08 10:05 
GeneralRe: Calling ActiveX DLL from MFC - passing arrays Pin
CPallini3-Jan-08 10:53
mveCPallini3-Jan-08 10:53 
GeneralRe: Calling ActiveX DLL from MFC - passing arrays Pin
mla1543-Jan-08 11:17
mla1543-Jan-08 11:17 
QuestionRe: Calling ActiveX DLL from MFC - passing arrays Pin
CPallini3-Jan-08 21:11
mveCPallini3-Jan-08 21:11 
GeneralRe: Calling ActiveX DLL from MFC - passing arrays Pin
mla1544-Jan-08 3:39
mla1544-Jan-08 3:39 
AnswerRe: Calling ActiveX DLL from MFC - passing arrays Pin
Lim Bio Liong4-Jan-08 23:24
Lim Bio Liong4-Jan-08 23:24 
Hello Michael,

Your VB object method f1 declared arr1() as of type "string".

Your CreateASafeArray() C++ function declared the SAFERRAY as holding elements of type VT_VARIANT.

This is the problem : VT_VARIANT type is not a string. VT_BSTR is.

To resolve the problem, either :

1. Change the signature of f1 to :

Public Function f1(ByRef arr1() As Variant, ByRef arr2() As Double) As String()
ShowList arr1
End Function

or

2. Change the call to CreateSafeArray() in CreateASafeArray() function to :

pSA= SafeArrayCreate(VT_BSTR,1,aDim); // create a 1D SafeArray of VARIANTS

and then make the appropriate changes to the rest of the code in CreateASafeArray().

Hope the above suggestions will help you.

Best Regards,
Bio.
GeneralRe: Calling ActiveX DLL from MFC - passing arrays [modified] Pin
mla1547-Jan-08 4:24
mla1547-Jan-08 4:24 
GeneralRe: Calling ActiveX DLL from MFC - passing arrays Pin
Lim Bio Liong7-Jan-08 15:10
Lim Bio Liong7-Jan-08 15:10 
QuestionMSSOAPLib30 SoapReader30Class LoadWithParser Error Pin
miauwmiauwmiauw2-Jan-08 19:31
miauwmiauwmiauw2-Jan-08 19:31 
QuestionHow to Use events from VB.NET in VC.NET? Pin
ritz12341-Jan-08 2:38
ritz12341-Jan-08 2:38 
GeneralActiveXControl with empty Parameters in c# Pin
FriendOfAsherah30-Dec-07 23:14
FriendOfAsherah30-Dec-07 23:14 
Questionprinting - dot matrix printer Pin
bijumon Mathew30-Dec-07 18:54
bijumon Mathew30-Dec-07 18:54 
GeneralHey man, COM stands for Component Object Model Pin
CPallini30-Dec-07 21:14
mveCPallini30-Dec-07 21:14 
GeneralShell Extension Left-Click Pin
Jens Frederich28-Dec-07 23:49
Jens Frederich28-Dec-07 23:49 
QuestionOverride GetOverrideKeyPath of IDocHostUIHandler2 interface. Pin
ashdwivedi26-Dec-07 21:07
ashdwivedi26-Dec-07 21:07 
Generalabout dll and exe Pin
Shaileshvb26-Dec-07 17:44
Shaileshvb26-Dec-07 17:44 
GeneralRe: about dll and exe Pin
CPallini26-Dec-07 23:09
mveCPallini26-Dec-07 23:09 
General32bit deskband DLL in Vista64 Pin
exper_t24-Dec-07 21:18
exper_t24-Dec-07 21:18 
GeneralRe: 32bit deskband DLL in Vista64 Pin
«_Superman_»27-Dec-07 22:56
professional«_Superman_»27-Dec-07 22:56 
Questionhow to convert .aspx page to .pdf on fly using asp.net in vb.net Pin
gopal_Pandey20-Dec-07 18:03
gopal_Pandey20-Dec-07 18:03 
Generalexcel object Pin
gauthee20-Dec-07 3:41
gauthee20-Dec-07 3:41 
GeneralRe: excel object Pin
User 21559720-Dec-07 5:17
User 21559720-Dec-07 5:17 
GeneralCOM Object NameSpace Pin
Ju@ncho19-Dec-07 7:05
Ju@ncho19-Dec-07 7:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.