Click here to Skip to main content
15,901,035 members
Home / Discussions / COM
   

COM

 
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 
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 
Have I understood this correctly, you want to receive a SafeArray from your call to shapes.Range ()? And this SafeArray will be populated with ULONGS?

Have a look at Chris Sells' SAFEARRAY Wrapper class:

http://www.sellsbrothers.com/tools/comvector.h


You should use it like this, where Size is the number of elements you are expecting back:
<br />
CComVector<ULONG> v (Size);<br />
CComVectorData<ULONG> rg (v);<br />
SAFEARRAY* sa = 0;<br />
v.DetachTo (&sa);<br />
<br />
CShapes shapes(doc.GetShapes());<br />
CShapeRange sr(shapes.Range(sa));<br />
<br />
// Access the data passed back<br />
for (int i = 0; i < rg.Length (); i++)<br />
{<br />
   DWORD Value = rg[i];<br />
}<br />


Hope this helps
Jon Smile | :)
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 
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 

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.