🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.language.csharp
Article #131

Re: CSharp / OLE

#131
From: Looki VanDyke
Date: Fri, 20 Apr 2007 07:33
58 lines
2273 bytes
Marc Rohloff [TeamB] 
schrieb:
> On Tue, 17 Apr 2007 09:06:16 +0200, Looki VanDyke wrote:
> 
>> 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.
> 

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.
Technical Details
Message-ID: <46286cc9$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <462471e1$1@newsgroups.borland.com> <qbaacvhq3tkk.dlg@dlg.marcrohloff.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,a29b06084724d61a
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 20 Apr 2007 09:33:50 +0200
From: Looki VanDyke <Nixus@minimax.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.8.1.2) Gecko/20070222 SeaMonkey/1.1.1
MIME-Version: 1.0
Newsgroups: borland.public.csharpbuilder.language.csharp
Subject: Re: CSharp / OLE
References: <462471e1$1@newsgroups.borland.com> <qbaacvhq3tkk.dlg@dlg.marcrohloff.com>
In-Reply-To: <qbaacvhq3tkk.dlg@dlg.marcrohloff.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 134.176.129.42
Message-ID: <46286cc9$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1177054409 134.176.129.42 (20 Apr 2007 00:33:29 -0700)
Lines: 58
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail