Click here to Skip to main content
15,917,321 members
Home / Discussions / C#
   

C#

 
QuestionOpacity problems Pin
b43r_3oo34-Feb-07 21:14
b43r_3oo34-Feb-07 21:14 
AnswerRe: Opacity problems Pin
Martin#4-Feb-07 21:41
Martin#4-Feb-07 21:41 
GeneralRe: Opacity problems Pin
b43r_3oo34-Feb-07 22:15
b43r_3oo34-Feb-07 22:15 
GeneralRe: Opacity problems Pin
Martin#4-Feb-07 22:41
Martin#4-Feb-07 22:41 
GeneralRe: Opacity problems Pin
b43r_3oo34-Feb-07 22:55
b43r_3oo34-Feb-07 22:55 
QuestionOutlook 2003 Security Warning Pin
GermanDM4-Feb-07 20:44
GermanDM4-Feb-07 20:44 
AnswerRe: Outlook 2003 Security Warning Pin
Scott Hanslip5-Feb-07 5:00
Scott Hanslip5-Feb-07 5:00 
QuestionSome questions about C# and COM [modified] Pin
sunssuns4-Feb-07 19:28
sunssuns4-Feb-07 19:28 
i use ATL create a COM.
in IDL:

typedef
[
uuid(C21871A0-33EB-11D4-A13A-BE2573A1120F),
version(1.0),

helpstring("A Demo UDT variable")
]
struct UDTVariable
{
[helpstring("Name of the variable")] BSTR Name;
[helpstring("Value of the variable")] long Value;
[helpstring("Special case variant")] VARIANT Special;
[helpstring("point of pValue")] int *pVal;
} UDTVariable;

interface IImplementable : IDispatch
{
[id(1), helpstring("method GetUDTSequence")] HRESULT GetUDTSequence([in] long start, [in] long length, [out] SAFEARRAY(UDTVariable) *SequenceArr);
[id(2), helpstring("method GetOtherArray")] HRESULT GetOtherArray([out] UDTVariable** pData);
[id(3), helpstring("method GetData")] HRESULT GetData([out] short* pLength, [out] short* pData);
};

in ATL code:
public:
STDMETHOD(GetData)(/*[out]*/ short* pLength, /*[out]*/ short* pData);
STDMETHOD(GetOtherArray)(/*[out]*/ UDTVariable** pData);
STDMETHOD(GetUDTSequence)(/*[in]*/ long start, /*[in]*/ long length, /*[out]*/ SAFEARRAY **SequenceArr);


When i add reference of above COM, the signature will be create autolly:

[DispId(3)]
public virtual void GetData(out short pLength, out short pData);
[DispId(2)]
public virtual void GetOtherArray(IntPtr pData);
[DispId(1)]
public virtual void GetUDTSequence(int start, int length, out Array SequenceArr);

Question1:
About the fuction of GetData, if the data will be send to C#, the data will be movable? If it is movable, how let it fixed?

Question2:
how can I use the function : public virtual void GetUDTSequence(int start, int length, out Array SequenceArr) in C#?
I can't create a instance of Array becaust it is a abstract class.

Question3:how can I use the function : STDMETHOD(GetOtherArray)(/*[out]*/ UDTVariable** pData) in C#?
When I use:
UDTVariable* otherUDTArray;
The compiler tell me: Can't take address of ,get the size of, or declare a pointer to a managed type UDTVariable


Can you help me?



-- modified at 4:08 Wednesday 7th February, 2007


-- modified at 4:10 Wednesday 7th February, 2007

Human knowledge belongs to the world.

AnswerRe: Some questions about C# and COM Pin
Judah Gabriel Himango5-Feb-07 11:57
sponsorJudah Gabriel Himango5-Feb-07 11:57 
GeneralRe: Some questions about C# and COM Pin
sunssuns5-Feb-07 21:26
sunssuns5-Feb-07 21:26 
GeneralRe: Some questions about C# and COM Pin
Judah Gabriel Himango6-Feb-07 7:25
sponsorJudah Gabriel Himango6-Feb-07 7:25 
GeneralRe: Some questions about C# and COM Pin
sunssuns6-Feb-07 15:31
sunssuns6-Feb-07 15:31 
GeneralRe: Some questions about C# and COM Pin
Judah Gabriel Himango6-Feb-07 15:53
sponsorJudah Gabriel Himango6-Feb-07 15:53 
GeneralRe: Some questions about C# and COM Pin
sunssuns6-Feb-07 17:57
sunssuns6-Feb-07 17:57 
GeneralRe: Some questions about C# and COM Pin
Judah Gabriel Himango6-Feb-07 18:08
sponsorJudah Gabriel Himango6-Feb-07 18:08 
QuestionRelease Public static variables on application exit Pin
kalyan_24164-Feb-07 19:27
kalyan_24164-Feb-07 19:27 
AnswerRe: Release Public static variables on application exit Pin
Christian Graus4-Feb-07 19:58
protectorChristian Graus4-Feb-07 19:58 
QuestionAdding Subreport in a Subreport in crystal reports Pin
Shaurya_Rastogi4-Feb-07 18:53
Shaurya_Rastogi4-Feb-07 18:53 
AnswerRe: Adding Subreport in a Subreport in crystal reports Pin
Judah Gabriel Himango5-Feb-07 11:43
sponsorJudah Gabriel Himango5-Feb-07 11:43 
QuestionHi! Pin
Member 37946634-Feb-07 16:44
Member 37946634-Feb-07 16:44 
AnswerRe: Hi! Pin
engsrini4-Feb-07 19:37
engsrini4-Feb-07 19:37 
AnswerRe: Hi! Pin
quiteSmart4-Feb-07 19:54
quiteSmart4-Feb-07 19:54 
GeneralRe: Hi! Pin
Seishin#5-Feb-07 0:47
Seishin#5-Feb-07 0:47 
AnswerRe: Hi! Pin
Christian Graus4-Feb-07 19:57
protectorChristian Graus4-Feb-07 19:57 
AnswerRe: Hi! Pin
MinhajuddinK4-Feb-07 20:22
MinhajuddinK4-Feb-07 20:22 

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.