|
welcome
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,
The following is giving me fits in VB.NET. Any ideas how to make it work?
'VB.NET
Dim rng as PseudoRNG
rng = new PseudoRNG()
dim a(10) as Long
rng.GenerateBlock( a )
...
What I've tried (and how it does not work is listed below). Following that are KB article references... KB314708 does not resolve (even though it is supposed to). It is also broken on VS2005/.NET 2.0.
Does anyone know how to pass an array? Obvioulsy, I do not.
Jeff
HRESULT GenerateBlock([in, out] SAFEARRAY(VARIANT) * Block);<BR>
HRESULT GenerateBlock([in, out] SAFEARRAY(VARIANT*) * Block);<BR>
HRESULT GenerateBlock([in, out] SAFEARRAY(VT_DISPATCH) * Block);<BR>
HRESULT GenerateBlock([in, out] SAFEARRAY(IDispatch) * Block);<BR>
HRESULT GenerateBlock([in, out] SAFEARRAY(IDispatch*) * Block);<BR>
HRESULT GenerateBlock([in, out] SAFEARRAY(long) * Block);
SafeArrayTypeMismatchException Error Message When You Invoke a COM Method[^]
Using OLE Automation Marshaler for 16/16 & 16/32 COM Interface[^] (should not even apply)
|
|
|
|
|
Can you try using VARIANT with pparray .
Quick[^] search gives me following articles related to it.
|
|
|
|
|
In my application i have maintained i a map in CString is a key while IUnknown pointer is a value.
When i call the method in which map used. Using the value that is IUnknown pointer at AddRef() the application is crashing. I checked for NULL pointer but i can not figure out the cause.
Can anybody help me.
jiteen
|
|
|
|
|
Can you show some code ?
helpcode wrote: Using the value that is IUnknown pointer at AddRef() the application is crashing. I checked for NULL pointer but i can not figure out the cause.
Probably pointer you are holding is dereferenced already somewhere else .
|
|
|
|
|
helpcode wrote: Using the value that is IUnknown pointer at AddRef() the application is crashing. I checked for NULL pointer but i can not figure out the cause.
Most probably this happens because the COM object already has been destroyed. Please note, that the destructor of the object will not set your pointer to NULL. Therefore, testing for NULL pointers is just a first sanity check, but does not guarantee a valid object pointed to.
Did you increase the reference count of your COM object before you stored it in the map? I would recommend to use Wrappers like CComPtr or CComQIPtr instead of maintaining the reference count yourself.
Regards,
Tim
|
|
|
|
|
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.
|
|
|
|