Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / July 2009



Tip: Looking for answers? Try searching our database.

Run-time error '449': Argument not optional

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robert Harper - 01 Jul 2009 16:57 GMT
I have a VB6 application that is running against an ActiveX written in C++.
I've added a function to the ActiveX that I think is properly exposed to the
outside world but there seems to be some problem with the COM linking. The
function does not take any arguments and the code completion in VB6 finds the
function by the proper name and shows no arguments as well. When I run the
application and try to call the function, the debugger gives me the "Run-time
error '449': Argument not optional" error.

I think this is more of a COM linking problem but I have no idea of how to
resolve it. Any help would be much appreciated.
Signature

Live large, sail hard, and enjoy life.
Robert

Robert Harper - 01 Jul 2009 19:11 GMT
Found the problem. It was that in the header file in one order where the
afx_msg macro is interpreted and in the source file where the DISP_FUNCTION
macro was interpreted, it was swapped with another function name that took a
parameter.

Kind of dicey if you ask me but oh well. Chock one up to experience.
Signature

Live large, sail hard, and enjoy life.
Robert

> I have a VB6 application that is running against an ActiveX written in C++.
> I've added a function to the ActiveX that I think is properly exposed to the
[quoted text clipped - 6 lines]
> I think this is more of a COM linking problem but I have no idea of how to
> resolve it. Any help would be much appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.