Click here to Skip to main content
15,913,487 members
Home / Discussions / COM
   

COM

 
GeneralExecute mode detection in EXE COM Pin
Ryszard Krakowiak4-Apr-03 18:51
Ryszard Krakowiak4-Apr-03 18:51 
GeneralRe: Execute mode detection in EXE COM Pin
Stephane Rodriguez.4-Apr-03 18:58
Stephane Rodriguez.4-Apr-03 18:58 
GeneralRe: Execute mode detection in EXE COM Pin
J. Dunlap4-Apr-03 19:54
J. Dunlap4-Apr-03 19:54 
GeneralRe: Execute mode detection in EXE COM Pin
Ryszard Krakowiak4-Apr-03 20:08
Ryszard Krakowiak4-Apr-03 20:08 
GeneralRe: Execute mode detection in EXE COM Pin
Vi26-Apr-03 20:42
Vi26-Apr-03 20:42 
GeneralATL 7.0 Passing SafeArrays Pin
Nicholas Cardi4-Apr-03 5:06
Nicholas Cardi4-Apr-03 5:06 
GeneralRe: ATL 7.0 Passing SafeArrays Pin
J. Dunlap4-Apr-03 6:47
J. Dunlap4-Apr-03 6:47 
GeneralRe: ATL 7.0 Passing SafeArrays Pin
Nicholas Cardi4-Apr-03 7:33
Nicholas Cardi4-Apr-03 7:33 
I should have been more clear.

I want to pass the SafeArray pointer out to VB 6 in ATL 3.0.
I used to be able to do this with the following code.

foo(SAFEARRAY(long) *psa);

However the same thing in ATL 7.0 won't compile

NOTE: I am using an emedded idl VS.NET

//Actual code

#define _ATL_ATTRIBUTES 1
#include "stdafx.h"
#include "resource.h"
#include "atlbase.h"
#include "atlcom.h"
#include "oleauto.h"
#include "atlsafe.h"
#include "oaidl.h"

// The module attribute causes DllMain, DllRegisterServer and DllUnregisterServer to be automatically implemented for you
[ module(dll,name="ATL7TEST")];

[object, dual, uuid(4D9BCA91-2F02-4cee-A589-2CC4D9821156)]
__interface IATL7TEST
{

HRESULT TestRaiseEvent();

};

[object,uuid("8D0F6D5E-DDC3-4371-BB08-49864F5DE356")]
__interface _IATL7EVENTS
{
HRESULT MyFirstEvent(SAFEARRAY(long*) *varname );

};

[coclass, uuid(EBAA6CB2-ED31-4e08-8DF8-068B2978C3F7),event_source(com)]
class TESTING :
public IATL7TEST
{
public:

__event __interface _IATL7EVENTS;
HRESULT TestRaiseEvent()
{
CComSafeArray<long> Test;
SAFEARRAY *psa;
SAFEARRAYBOUND rgsabound[1];
rgsabound[0].lLbound = 0;
rgsabound[0].cElements = 10;
psa = SafeArrayCreate(VT_INT, 1, rgsabound);
long test;
test = 1234;
LPSAFEARRAY lpsa;
lpsa = psa;

__raise MyFirstEvent(psa);
return S_OK;
}

};


//compilation errors
//v:\ATL7TEST\ATL7TEST.cpp(33): error C2061: syntax error : identifier 'tagSAFEARRAY'
//v:\ATL7TEST\ATL7TEST.cpp(33): error C2059: syntax error : ')'
//v:\ATL7TEST\ATL7TEST.cpp(33): error C2143: syntax error : missing ')' before ';'





Forever Developing
GeneralMFC->COM & JNI Pin
GWENJi4-Apr-03 4:21
GWENJi4-Apr-03 4:21 
GeneralPlug n Play Pin
Prabhakar3-Apr-03 11:27
Prabhakar3-Apr-03 11:27 
QuestionCan I add a menu option to Internet Explorer? Pin
rdautel3-Apr-03 7:41
rdautel3-Apr-03 7:41 
AnswerRe: Can I add a menu option to Internet Explorer? Pin
Anonymous3-Apr-03 7:54
Anonymous3-Apr-03 7:54 
QuestionActiveX on Dialog breaks DialogBoxParam? Pin
Dan Thurman3-Apr-03 7:00
Dan Thurman3-Apr-03 7:00 
QuestionVirtual drive using Shell Extensions - is it possible? Pin
PoliakovS2-Apr-03 23:55
PoliakovS2-Apr-03 23:55 
Generalmultiple IDispatches Pin
mweiss2-Apr-03 22:02
mweiss2-Apr-03 22:02 
GeneralRe: multiple IDispatches Pin
pba_9-Apr-03 12:48
pba_9-Apr-03 12:48 
GeneralDCOM & Dual LAN Pin
Deepak Bajaj2-Apr-03 17:56
Deepak Bajaj2-Apr-03 17:56 
GeneralRe: DCOM & Dual LAN Pin
pba_9-Apr-03 12:55
pba_9-Apr-03 12:55 
GeneralDCOM & Dual LAN Pin
Deepak Bajaj2-Apr-03 17:56
Deepak Bajaj2-Apr-03 17:56 
General"The stub received bad data" error when no marshalling is taking place in Win98 Pin
Alberto Bar-Noy2-Apr-03 8:33
Alberto Bar-Noy2-Apr-03 8:33 
GeneralWord automation Pin
Martyn Pearson2-Apr-03 1:48
Martyn Pearson2-Apr-03 1:48 
GeneralRe: Word automation Pin
Martyn Pearson2-Apr-03 2:12
Martyn Pearson2-Apr-03 2:12 
Generalthreading problems Pin
Dietmar Goetz1-Apr-03 3:49
Dietmar Goetz1-Apr-03 3:49 
GeneralRe: threading problems Pin
pba_9-Apr-03 13:07
pba_9-Apr-03 13:07 
Generalsome questions about events Pin
particle2k31-Mar-03 4:34
particle2k31-Mar-03 4:34 

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.