I want to get a
string value out of
an
activex-component.
I solved it easily
in delphi:
var
hlpstrptr
: WideString;
hlp_string
: String;
...
ActiveXComponent.GetCreatorID(hlpstrptr);
hlp_CreatorID :=
hlpstrptr;
but in C# ??
I only know that
string hlpstr =
"";
result =
axActiveXComponent1.GetCreatorID(ref
hlpstr);
will not work, cause
the
"ActiveXComponent.GetCreatorID"-function
fails
with "wrong
parameter type".
So: hlpstr should be
a pointer to a
WideString (in
"dephi-words")
How can I achive
this with C#?
Best regards
Loki
> I only know that
> string hlpstr = "";
>
> result =
> axActiveXComponent1.GetCreatorID(ref
> hlpstr);
>
> will not work, cause the
> "ActiveXComponent.GetCreatorID"-function
> fails with "wrong parameter type".
>
> So: hlpstr should be a pointer to a WideString (in
> "dephi-words")
> How can I achive this with C#?
.NET doesn't have the concept of a pointer to a widestring.
The first thing to do would be to find out what the GetCreatorID
function expects as parameters, code insite should tell you this as
should a decent reflection tool.
What ActiveX are you trying to access?
--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
The documentation of
this routine says:
long
GetCreatorID(BSTR
FAR*
pbstrCreatorID);
The result of this
function is -4, a
table in the
documentation says
that -4 is "invalid
parameter" (buy the
way you are right
this error message
is internally
created by the
activex component).
Never the less I got
the same result when
I tried
hlpstr : String
instead of
hlpstr : WideString
with delphi.
Therefor I need an
equivalent
expression for this
in C#.
Thanks in advance
Loki.