Click here to Skip to main content
15,920,513 members
Home / Discussions / COM
   

COM

 
GeneralRe: programming autocad : GetAttributes Pin
JP GOBLET13-Aug-03 0:28
JP GOBLET13-Aug-03 0:28 
GeneralRe: programming autocad : GetAttributes Pin
Steve S13-Aug-03 0:40
Steve S13-Aug-03 0:40 
GeneralRe: programming autocad : GetAttributes Pin
JP GOBLET13-Aug-03 1:15
JP GOBLET13-Aug-03 1:15 
GeneralRe: programming autocad : GetAttributes Pin
JP GOBLET18-Aug-03 6:17
JP GOBLET18-Aug-03 6:17 
GeneralRe: programming autocad : GetAttributes Pin
JP GOBLET18-Aug-03 6:46
JP GOBLET18-Aug-03 6:46 
GeneralRe: programming autocad : GetAttributes Pin
JP GOBLET18-Aug-03 21:23
JP GOBLET18-Aug-03 21:23 
GeneralRe: programming autocad : GetAttributes Pin
Steve S18-Aug-03 22:09
Steve S18-Aug-03 22:09 
GeneralRe: programming autocad : GetAttributes Pin
JP GOBLET19-Aug-03 0:25
JP GOBLET19-Aug-03 0:25 
In fact i have no problem with GetAttributes : i know it returns a valid safearray
(variant type = VT_ARRAY|VT_DISPATCH); SafeArrayGetLBound & SafeArrayGetUBound return
correct values.

The problem is extracting a IAcadAttributeReference * from that array :
if i try to extract a variant from the array (presuming that the IAcadAttributeReference * is a member of the variant) :

_variant_t val; // i tried also with _variant_t *val
result = SafeArrayGetElement(arrayAttrib.parray, &i, &val); // result = S_OK
switch(val.vt)
{
case VT_BYREF|VT_UNKNOWN: ...
break;
case VT_BYREF|VT_DISPATCH: ...
break;
case VT_UNKNOWN: ...
break;
case VT_DISPATCH: ...
break;
case VT_ARRAY: ...
break;
}

val.vt does not correspond to any case of the switch
and most members of val are clearly invalid (0xccccccc)
-------------------

i understand you have others things to do than finding solutions to other people
problems; what you have already done is very kind, so if you don't see an evident
solution, don't mind. Thanks.

GeneralRe: programming autocad : GetAttributes Pin
Steve S19-Aug-03 0:38
Steve S19-Aug-03 0:38 
GeneralRe: programming autocad : GetAttributes Pin
Steve S19-Aug-03 0:44
Steve S19-Aug-03 0:44 
GeneralRe: programming autocad : GetAttributes Pin
JP GOBLET19-Aug-03 2:58
JP GOBLET19-Aug-03 2:58 
GeneralRe: programming autocad : GetAttributes Pin
JP GOBLET19-Aug-03 3:44
JP GOBLET19-Aug-03 3:44 
GeneralRe: programming autocad : GetAttributes Pin
JP GOBLET19-Aug-03 4:02
JP GOBLET19-Aug-03 4:02 
GeneralRe: programming autocad : GetAttributes Pin
Steve S19-Aug-03 4:37
Steve S19-Aug-03 4:37 
QuestionWhat is wrong with this code!!! Pin
adsilva12-Aug-03 0:36
adsilva12-Aug-03 0:36 
AnswerRe: What is wrong with this code!!! Pin
Stephane Rodriguez.12-Aug-03 0:51
Stephane Rodriguez.12-Aug-03 0:51 
AnswerRe: What is wrong with this code!!! Pin
Steve S12-Aug-03 0:51
Steve S12-Aug-03 0:51 
GeneralRe: What is wrong with this code!!! Pin
Stephane Rodriguez.12-Aug-03 1:00
Stephane Rodriguez.12-Aug-03 1:00 
GeneralRe: What is wrong with this code!!! Pin
Steve S12-Aug-03 1:01
Steve S12-Aug-03 1:01 
GeneralTree Control context menus Pin
Steven M Hunt11-Aug-03 12:36
Steven M Hunt11-Aug-03 12:36 
GeneralRe: Tree Control context menus Pin
Steve S11-Aug-03 22:04
Steve S11-Aug-03 22:04 
GeneralGetting mouse events from Powerpoint Pin
G. Raven11-Aug-03 4:10
G. Raven11-Aug-03 4:10 
GeneralSimilar problem Pin
ScarletEmerald5-Jun-04 16:22
ScarletEmerald5-Jun-04 16:22 
GeneralRecurrence object in Outlook Appointments Pin
Brigg Thorp11-Aug-03 1:44
Brigg Thorp11-Aug-03 1:44 
GeneralPlease help!! Pin
adsilva7-Aug-03 22:15
adsilva7-Aug-03 22:15 

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.