Click here to Skip to main content
15,925,255 members
Home / Discussions / COM
   

COM

 
GeneralRe: passing connection points parameters by ref Pin
SPENNER1-Dec-01 11:38
SPENNER1-Dec-01 11:38 
GeneralRe: passing connection points parameters by ref Pin
Anders Molin1-Dec-01 12:50
professionalAnders Molin1-Dec-01 12:50 
GeneralRe: passing connection points parameters by ref Pin
Michael P Butler2-Dec-01 1:54
Michael P Butler2-Dec-01 1:54 
GeneralRe: passing connection points parameters by ref Pin
SPENNER2-Dec-01 9:51
SPENNER2-Dec-01 9:51 
GeneralRe: passing connection points parameters by ref Pin
Anders Molin2-Dec-01 10:55
professionalAnders Molin2-Dec-01 10:55 
GeneralRe: passing connection points parameters by ref Pin
SPENNER4-Dec-01 7:56
SPENNER4-Dec-01 7:56 
GeneralRe: passing connection points parameters by ref Pin
Anders Molin4-Dec-01 8:11
professionalAnders Molin4-Dec-01 8:11 
GeneralUsing ActiveX Object inside ATL COM Object... Please Help Pin
Matt Philmon30-Nov-01 18:37
Matt Philmon30-Nov-01 18:37 
We have a communications ATL COM DLL used in a project here that used to load a Java COM object (on a web server) that communicates to a server running IMS transactions on a mainframe. The Java "object" was provided by the customer. Recently they "upgraded" to a newer component, an ActiveX DLL written in Microsoft J++. The old component wasn't a DLL, but a huge collection of Java class files. Because we couldn't import any DLL and had no Type Library to work with we had to do it the painful way, loading by ProgID (easy in VB, hard in ATL), getting the IDispatch pointer, and using Invoke.

This new version comes as a DLL which means I can easily #import the DLL itself and use that to make me a good ol smart pointer which I can use. That part was easy and appears to be fine. My smart pointer is using a single method in the new object called "processITOC". Visual Assist shows me that format of this sucker is:
_bstr_t processITOC ( BSTR * templatepath, BSTR * server, BSTR * port, BSTR * system, BSTR * UserId, BSTR * password, long * timeout, VARIANT * request, BSTR * sTranName );

Seems easy enough... more or less, I hate variants. However, every time I try to pass in the data, it blows with an Access Violation in MSVBVM60.DLL, 0xC0000005. I know this new DLL works fine because I can load it up in a VB project and use it just fine. However, in ATL it blows. I think I'm probably doing something really simple wrong but am currently lost. Could someone give me a hand?

_bstr_t Ret;
BSTR Template = L"file:///C:\\HostTemplates/";
BSTR LogDir = L"C:\\LOG\\";
BSTR Priority = L"3";
BSTR Mainframe = L"111.111.111.111";
WCHAR wchPort[10];
_itow(32000, wchPort, 10);
BSTR Port = wchPort;
BSTR User = L"user";
BSTR Password = L"password";
long Timeout = 240000;
BSTR System = L"DatabaseName";
BSTR TransID = L"ID";

VARIANT upArg;
VariantInit(&upArg);
V_VT(&upArg) = VT_BSTR;
V_BSTR(&upArg) = SysAllocString("ImAnXMLRequestwithtags");

m_pIHandler->setLoggingDirectory(&LogDir);
m_pIHandler->setLoggingPriority(&Priority);

Ret = m_pIHandler->processITOC( &Template,
&Mainframe,
&Port,
&System,
&User,
&Password,
&Timeout,
&upArg,
&TransID );

If someone could point something out I'd be grateful.

Thanks,
Matt
GeneralWinXP Pin
Gfw30-Nov-01 2:39
Gfw30-Nov-01 2:39 
QuestionHow to version an ActiveX dll? Pin
David Stranz29-Nov-01 13:19
David Stranz29-Nov-01 13:19 
GeneralActiveX & Threads...gettin' Funky - Check this Out. Pin
Tim Rymer28-Nov-01 11:29
Tim Rymer28-Nov-01 11:29 
GeneralRe: ActiveX & Threads...gettin' Funky - Check this Out. Pin
Anders Molin30-Nov-01 23:40
professionalAnders Molin30-Nov-01 23:40 
GeneralRe: ActiveX & Threads...gettin' Funky - Check this Out. Pin
Ali Issa6-Dec-01 3:34
Ali Issa6-Dec-01 3:34 
GeneralVB Client: can't see inner aggregated COM object interface Pin
28-Nov-01 5:36
suss28-Nov-01 5:36 
GeneralPassing SAFEARRAYS through COM events Pin
Rick Dangerous28-Nov-01 2:07
Rick Dangerous28-Nov-01 2:07 
GeneralRe: Passing SAFEARRAYS through COM events Pin
Rashid Thadha4-Dec-01 10:39
Rashid Thadha4-Dec-01 10:39 
GeneralRe: Passing SAFEARRAYS through COM events Pin
Rick Dangerous6-Dec-01 6:23
Rick Dangerous6-Dec-01 6:23 
GeneralRe: Passing SAFEARRAYS through COM events Pin
Rashid Thadha6-Dec-01 11:43
Rashid Thadha6-Dec-01 11:43 
QuestionExtending Active Directory UI ? Pin
Hendrik Kurniawan27-Nov-01 16:35
Hendrik Kurniawan27-Nov-01 16:35 
QuestionExtending Active Directory UI ? Pin
Hendrik Kurniawan27-Nov-01 16:33
Hendrik Kurniawan27-Nov-01 16:33 
GeneralActiveX control looses TAB key Veeerrry Strange Pin
Bill Wilson27-Nov-01 12:44
Bill Wilson27-Nov-01 12:44 
GeneralAutomation Error Pin
Firoz27-Nov-01 0:43
Firoz27-Nov-01 0:43 
GeneralRe: Automation Error Pin
Shadi Al-Kahwaji27-Nov-01 22:29
Shadi Al-Kahwaji27-Nov-01 22:29 
GeneralNEW Guy Needs Help w/COM Pin
21-Nov-01 17:31
suss21-Nov-01 17:31 
GeneralRe: NEW Guy Needs Help w/COM Pin
Firoz21-Nov-01 18:37
Firoz21-Nov-01 18:37 

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.