|
Are the return semantics for safearray the same as for BSTR, in that the provider does all the allocating and receiver cleans up?
Using IDL, I'm creating a dual interface (which I will implement by writing an automation compatible COM object in C++) so that I can use my COM object in a scripting environment.
One of the methods needs to return an array of bytes, so I need to use safearray.
Here's the current version of the IDL source file:
RclsoftwareDendrosV2Auto.idl
The relevant lines are:
<br />
typedef SAFEARRAY(unsigned char) DataArray;<br />
<br />
<br />
[helpstring("Reads raw data from an Entry.")]<br />
HRESULT ReadData<br />
(<br />
[in] IDendros0200Entry1* inEntry,<br />
[in] int inLine,<br />
[out,retval] DataArray* outItem<br />
);<br />
[helpstring("Writes raw data into an Entry.")]<br />
HRESULT WriteData<br />
(<br />
[in] IDendros0200Entry1* inEntry,<br />
[in] int inLine,<br />
[in] DataArray inItem<br />
);<br />
Does that look correct?
After processing the IDL file, the generated header file contains the following relevant lines:
<br />
<br />
typedef SAFEARRAY * DataArray;<br />
<br />
<br />
virtual HRESULT STDMETHODCALLTYPE ReadData( <br />
IDendros0200Entry1 *inEntry,<br />
int inLine,<br />
DataArray *outItem) = 0;<br />
<br />
virtual HRESULT STDMETHODCALLTYPE WriteData( <br />
IDendros0200Entry1 *inEntry,<br />
int inLine,<br />
DataArray inItem) = 0;<br />
So in ReadData I get a pointer-to-pointer which receives the address of the safe-array that I create, and the caller frees the safe-array later on (just as is the case with BSTR) ?
|
|
|
|
|
Yes that sounds correct, just to be clear, your ReadData method will create [and populate] the SafeArray and assign the SafeArray pointer to your out parameter:-
if(outItem != NULL)<br />
(*outItem) = SafeArrayCreate(...)
The caller, must then free up the returned SafeArray
|
|
|
|
|
Hi all,
I have made an Explorer bar .
While selecting my Explorer bar from View->Explorer Bar->MyExplorerBar , the
control goes inside the SetSite() of my Porgramme . Here I needs to display an
Html Page in my Explorer bar as "shdocvw.dll" do. How is it Possible ?? , Is
there any default function for that ??.
Please Help me
Thanks
George
|
|
|
|
|
Does IWebBrowser2 interface help?
S o h a i l K a d i w a l a
To Err Is Human; to Debug, Divine
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hi all,
I am in a task of developing an Explorer bar for IE . But I was unable to get an
Explorer bar due to incorrect registry Entries. Can anyone please help me by
giving a .rgs file for an Explorer bar.
Thanks
George
|
|
|
|
|
|
Sir,
I am converting a ActiveX(DSO Framer)control into .Net assembly.
1. I was able to import it as assembly using "Tlbimp" utility,
2. I could able to convert the content in to Intermediate Language form by using utility "Ildasm" utility. But
3. When I tried to edit the content for verification by using the utility "Ilasm" its giving error as below
Errors /* No entry point declared for executable
Could not create output file, error code=0x80004005
***** FAILURE *****
Please give me what to do now. Please.
and
Creating PE file
Error: No entry point declared for executable
Could not create output file, error code=0x80004005
***** FAILURE *****
*/
Please check these errors and give me a good solution please, I am struck here please. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Stop. Please stop. Do not do this.
I have tried to be patient. Christian has tried to be patient. Sohail has tried to be patient. And yet you still do it. You still cross post and try to keep this at the top of the various forums.
Look. If somebody could help you (and I think you are beyond help here), they would have done by now. If you aren't capable of doing this, perhaps you could ask Microsoft how to do this.
Nobody is going to write this code for you. Nobody is going to wrap the DSO control for you. Please, read the links that have been suggested. Buy a book on .NET - there are several good ones. Tell the client that what they want can't be done. Whatever. But please stop spamming this board.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hei, you seem to be so serious, I am sorry. I will delete them. Ok.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Sir,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Please don't cross post. We have asked you before.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Dear sir,
I have done the assembly registration and gac intallation in two steps, but I am getting error as
* Failure adding assembly to the cache: An attempt was made to load a program with an incorrect format. *.
Please tell me what could be the reason, and where I might have done mistake. The steps I did are as below.
No. 1 C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin>sn -p D:\Aleem\DSOControl1\DSOControl1.snk
D:\Aleem\DSOControl1\DSOControl1.dll
Microsoft (R) .NET Framework Strong Name Utility Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
Public key written to D:\Aleem\DSOControl1\DSOControl1.dll
No. 2. C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin>gacutil /i D:\Aleem\DSOControl1\DSOControl1.dll
Microsoft (R) .NET Global Assembly Cache Utility. Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
Failure adding assembly to the cache: An attempt was made to load a program with an incorrect format.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Please don't cross post. We have asked you before.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
|
Thank you sohail, but if you have more please give me. I am not suire it will be 100% for it. Because, I am struck here, give me few more links for getting out of this, please.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
I don't want to sound rude here but
- I gave you search results from Google. Strong Name assemblies is part of .NET concepts. I am not too familiar with .NET so can't explain you. You will need to search (Google) and read the articles correctly, it will solve all your queries. I see your problem more about not knowing the details/concepts and it really is no glitch in your app, so please read the articles on "Strong Name". You need to help yourself by understanding how to do and not just get some solution which you can use directly.
- You seem to be cross posting across forums. This is not appreciated on CodeProject. Best would be to find appropriate forum and someone will answer you soon. Cross posting will only not earn you respect nor any answers here!
The MSDN forum link I mentioned shows how to generate Strong Name assemblies. Please ready it completely.
After you do the above things, still if you are stuck, post in correct forum and people will be glad to help you.
warm regards
S o h a i l K a d i w a l a
To Err Is Human; to Debug, Divine
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Sorry Sohail for troubling all, but It seems could able to get it, because I have converted the activeX in to .Net assembly and installed in to GAC. The only thing left is I should be able use it in my application. Please pray for my success. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Please don't cross post. We have asked you before.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Please don't cross post. We have asked you before.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
I am trying to programmatically re-start a COM+ application using VBScript
and "COM+ Admin" automation library. In Win XP, its all taken care by COM+ itself
when you set the "Pooling & Recycling" properties. But in Windows 2000,
scripting seems to be the only way. An outline of the script:
<br />
Set catalog = CreateObject("COMAdmin.COMAdminCatalog.1")<br />
catalog.ShutdownApplication("My Appln")<br />
catalog.StartApplication("My Appln")<br />
The restart works fine but the active clients at the time of restart are
terminated abruptly. Is there anyway that I can do a graceful restart?
Or in other words, can i somehow get the number of active instances of each
component in a package, so that the script can wait till this count becomes zero,
before restarting ? I tried the other automation library "COM+ Services", but no clue.
Thanks in advance.
Regards,
Venkat.
|
|
|
|
|
I think you'll need to look at the COM+ Events & Statistics API to do this.
Alternatively you could just do the restart, then in your client application(s) check the returned HRESULT for (I think) RPC_S_SERVER_UNAVAILABLE, at which point the client could (re)CoCreateInstance the required object.
|
|
|
|
|
can anybody help me with the iso-8583 information?
thx
|
|
|
|
|
|
Hi
I wanna know that how can i create OLE Servers within my application.
I mean i wanna make my application insertable as OLE Server
Hope somebody answers me soon.
Bye
pitchu
|
|
|
|
|
Then study COM. There are a plethora of books about.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|