|
Search on CP returns me following articles[^]. Have a look at it.
|
|
|
|
|
I get the following error when running my web service now: "Retrieving the COM class factory for component with CLSID {value} failed due to the following error: 80070005.".
I know nothing about COM or utilizing VB6 in my applications and am just now starting to root around to find things out. This is something I havent found a solution to. I inherited a project from a programmer that is no longer here and all of the references and such were already setup. I have attempted to make some changes to a VB6 project that is used in this application but I did not copy anything over and this was working last week and now it isnt. Any help would be greatly appreciated.
Cleako
|
|
|
|
|
cleako wrote: error: 80070005
corresponds to Access related issues (E_ACCESSDENIED). Please confirm that you have appropriate access to instantiate that object
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.
|
|
|
|
|
I just checked the security on that DCOM listing and added IUSR since this is a web app and it made no difference. Is there something else I should be doing?
Cleako
|
|
|
|
|
Doesn't you need to give access to aspnet user ,I'm not sure, but asp.net webservice runs under a user having least previleges?
BTW, restart the PC after change to be effective.
|
|
|
|
|
IUSR_<computername> is the appropriate user for least privileges.
I did this and at first I got a 8007007e error and ran regsvr32 on the original DLL and that got rid of that error then the original 80070005 came back.
The issue I am having with all of this is that I cant follow the directions on http://www.ftponline.com/vsm/2002_04/magazine/features/rlhotka/[^] where it claims all I have to do is add a reference of the DLL produced by Visual Studio 8 and it should work. It just tells me there are no public properties so then I run the tool TlbImp.exe to output a DLL that can be accessed for whatever reason and I can then point to everything and access the class names but it throws that error during runtime.
Cleako
|
|
|
|
|
I am creating an automation client similar to Microsoft Office applications. Now, to expose the functionality of the application to the plugin, I have created a component "IAs" which is kind of a group for "IA". Now the thing is there may be as many as 2000 "IA" created at a single time and they are dynamic which means I may have to destroy all the 2000 "IA" and recreate them again multiple times.
Is using the method outlined above feasible? What kind of load would the PC have to bear? Would I be better of exposing just one interface and using that interface to manage the other sub components? Or would creating 2000 "IA" again and again be a better choice?
Please help.
---
Hakuna-Matada
It means no worries for the rest of your days...
It's our problem free, Philosophy
"I think my response was 'What idiot dreamed this up?'" -- Mary Ann Davidson, Oracle's chief security officer, in typical blunt manner, remembering her reaction to the company's scheme to brand its databases as "unbreakable."
|
|
|
|
|
Is "IA" similar to an application or component IA's "State"? I believe you need to think about a better design by considering the fact that these IA instances are not like normal C++ objects. There is an amount of Marshalling, Cross Apartment access, and out of process calls required which may affect performance. The design choice should also consider these aspects and not just the frequent memory allocation for example.
So identify what exactly is the purpose of IA implemented instances and do you really need to expose them to client. Also how often will a "recreate" request come to you.
Also the design choice you are talking about is
1. Expose all interface directly
2. Use a Facade to expose the functionality instead (See facade design pattern)
Both work but only based on the exact need of problem you can find the best choice or a completely new way then what is said above.
What you have mentioned is abstract, if you can provide more details then we can help better.
These are my views so far. I hope they make sense in context of your problem
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.
|
|
|
|
|
|
HakunaMatada wrote: CommandBars and CommandBar Objects of the Office API
I would go by this.
Also you have now mentioned that the individual Element needs to be refreshed, which contrasts recreated.
Quick thoughts -
- You may have ICategory
- ICatgeory having a method which returns IElement collection
- Support enumeration of element collection - foreach in VB if required
- ICategory will have its own get/set properties to read and change its state or attribute
- IElement will have its own get/set properties to read and change its state or attribute
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
I want to create windows mail account on Vista,
For that I came to know that it can be possible trough IImnAccountManager.
But to get the pointer of this interface need "imnact.h" file.
and I think also need proper dll to be registered for this.
that i don't have.
Can any body help me on this..?
Or If any body have idea to create outlook express account trough any type of
C++/VC++ code then please provide me information on this.
Thanks,
Prakash.
sonani prakash
|
|
|
|
|
I don't have details related to your problem, but I tried looking the interface detail in MSDN
http://msdn2.microsoft.com/en-us/library/ms712735.aspx[^]
to read and possibly help you. But I found the MSDN description as follows
IImnAccountManager
Deprecated. This object allows a client to create, open, delete, and enumerate accounts.
Considering that MSDN documentation for this interface is latest, this interface is deprecated so do you still want to use it?
You will need msoeacct.dll version 6.0 or later for this interface.
From MSDN, I got this link - http://msdn2.microsoft.com/en-us/library/ms715237.aspx[^]
This might help you.
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.
|
|
|
|
|
Dear Sohail,
Thanks for your reply.
You are right they are mentioning it's deprecated so what I understood is It has support on XP but not on Vista.Is it ?
For using this interface also I need "imnact.h" file.that i don't get any where in visual studio setup or any where else.
and the link you have suggested that I have already read it.
What I come to know is,for creating account on windows mail they are creating one .oeaccount file into some specific folder of windows mail, which will contain account information in the form of xml data.
Now I have problem here about password tag in this file,how to generate encrypted password.
so I thought there should be some way to create this account through some API.
I am stuggling since long time but not getting any clue on this...
could you suggest any other site or help on this...?
Thanks,
Prakash
sonani prakash
|
|
|
|
|
Sonani Prakash wrote: what I understood is It has support on XP but not on Vista.Is it ?
From what I read and understood, it seems they were unsure about whether it this API will exist on XP in future or not. Since the documentation mentions it to be Deprecated and a Note says - The IImnAccountManager interface is available for use in Microsoft Windows XP. It might be altered or unavailable in subsequent versions., I would not continue using this interface.
Sonani Prakash wrote: For using this interface also I need "imnact.h" file.that i don't get any where in visual studio setup or any where else.
In such cases, you may need the latest Platform SDK from Microsoft.
Sonani Prakash wrote: creating account on windows mail they are creating one .oeaccount file into some specific folder of windows mail, which will contain account information in the form of xml data.
Yes, they talk about some XML configuration files and entries to be created for Windows mail account.
Sonani Prakash wrote: Now I have problem here about password tag in this file,how to generate encrypted password.
so I thought there should be some way to create this account through some API.
Can't help, as I said earlier, I don't know or haven't worked on this yet. Just read MSDN to help you. Try this forum and post your query there as well -
http://forums.microsoft.com/MSDN/default.aspx?ForumGroupID=24&SiteID=1[^]
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.
|
|
|
|
|
Thanks dear,
For your suggestions.
Prakash.
sonani prakash
|
|
|
|
|
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.
|
|
|
|