Click here to Skip to main content
15,910,121 members
Home / Discussions / COM
   

COM

 
GeneralRe: Client with flexible server name. Pin
MauriceMG10-Apr-03 20:04
MauriceMG10-Apr-03 20:04 
GeneralDetecting the apartment Pin
Dave Bryant9-Apr-03 9:54
Dave Bryant9-Apr-03 9:54 
GeneralRe: Detecting the apartment Pin
Vi29-Apr-03 23:14
Vi29-Apr-03 23:14 
GeneralRe: Detecting the apartment Pin
Dave Bryant10-Apr-03 9:51
Dave Bryant10-Apr-03 9:51 
GeneralPassing safearray of UDTs Pin
bharanidharan9-Apr-03 9:32
bharanidharan9-Apr-03 9:32 
GeneralRe: Passing safearray of UDTs Pin
Vi29-Apr-03 22:47
Vi29-Apr-03 22:47 
GeneralCOM messages Pin
_Magnus_8-Apr-03 23:12
_Magnus_8-Apr-03 23:12 
QuestionPassing SafeArray in Automation? Pin
mandelbrot8-Apr-03 19:36
mandelbrot8-Apr-03 19:36 
In a MS Word automating program, I want to get a ShapeRange from a Shapes object, which need a SafeArray parameter. I wrote the following code:
------------------------------------------
COleSafeArray sa;
DWORD bounds=1;
sa.Create(VT_VARIANT,1,&bounds);
COleVariant v_ind((long)1,VT_I4);
long ind=0;
sa.PutElement(&ind,&v_ind);
//sa.Detach();

CShapes shapes(doc.GetShapes());
CShapeRange sr(shapes.Range(sa));
-------------------------------------------
It just throws an exception saying that the parameter has an invalid value. If I Detach the array before passing it to the Range method, the array becomes empty. Another exception is thrown out saying that out of bound.

Anyone can tell me how can I get it right?
Thx
AnswerRe: Passing SafeArray in Automation? Pin
geo_m8-Apr-03 21:49
geo_m8-Apr-03 21:49 
AnswerRe: Passing SafeArray in Automation? Pin
Jon Taylor8-Apr-03 22:39
Jon Taylor8-Apr-03 22:39 
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 
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 

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.