|
Simply it tries to say, that some library your dll depends on is missing. I would suspect, that you built your dll with dependency on msvcrt libraries that are supplied with VC.
You can either redistribute the dlls or you can build it with no dependency using static linking - see project settings of your project.
Anyway, you can check the dependency with the depends tool from the SDK.
|
|
|
|
|
Yes, i built my programm with static linking method. And i noticed one thing, if Visual Studio and Active Sync installed on machine, my dll registers successfully, but if one of theme is apsent it writes an error. I tried to use dependecy utility, found all the dlls and copied them with my COM dll on another machine, and still have error.
|
|
|
|
|
Well, simply, if the LoadLibrary function in the regsvr utility failed, there's still something missing - did you copied all the dlls your library depends on into the same path, or somewhere where it can be found by LoadLibrary ?
Or possibly, there can be dll missing that is required by some of the dlls you are depending on.
By static linking in VC I mean what you find in Project properties , C++/Code Generation and Runtime Library setting.
Here should be /MT or /ML .
|
|
|
|
|
Thanks!
I've been having the same problem and it's been driving me
nuts for a week. I could not figure out what was going on.
My new dll made use of other dll's, and I didn't have them
in the path.
|
|
|
|
|
Hi,
This following code in a console application:
CoInitialize(0);
HRESULT hr;
SHDocVw::IShellWindowsPtr spSHWinds;
hr = spSHWinds.CreateInstance (__uuidof(SHDocVw::ShellWindows));
====> Returns 0x0x80040154 - Class not registered.
Can someone please help me why I am getting this error?
Any help would be greatly appreciated.
SenPy
|
|
|
|
|
hm. try to specify as argument ProgId. smth like, "SHDocVw.SHDocVw" or "{A21A4187-5A86-4E26-B40A-856F9035D93B}" - clsid of your component.
4apai
There're no impossible tasks. There're tasks that required infinite period of execution time.
|
|
|
|
|
I have an ActiveX control which displays models containing a huge number of facets in OpenGL. I use recursion during the building of the models and unfortunately am overflowing the stack.
How does one increase the size of the stack in a COM/ATL dll?
I've tried the compiler option '/F' and linker option '/STACK' without any luck. Is there a way to do this programmatically?
Thanks in advance!
Emil
|
|
|
|
|
As far as i recall, the stack size is not related to a DLL, its the process including the DLL that is deciding on its stack size.
Depending on the amount of information stored on the stack, it would probably be better if you kept only a pointer to a struct with the info you need at each level of recursion. You could event count the recursion level and keep some information into an array that is dependant on the recursion level.
Here are a few points you might want to investigate too.
How many levels deeps are you getting into ?
Are you sure you're not simply entering an infinite recursion which does overflow the stack.
Is the recursive function having too many parameters, could you simplify these parameters and pass in a struct pointer ?
Are there too many local variables in my recursive function ?
Every time you enter a function, there is a number of bytes being reserved in the stack, each parameter passed to a function could be taking some stack space so if you recurse on a function that requires 40 bytes for its parameters it can add up quickly. Also, local variables do take space on the stack.
Having a recursive function with "char somearray[512]" isnt convenient in a recursive function since on each recursion level, 512 bytes will be reserved for that level.
|
|
|
|
|
Hello I'm new to COM and ATL. I need some help regarding add-ins. I want to make an add-in for the Visual Basic Editor, displayed as a dialog-style window, using Visual C++. I know that COM and ATL are used, but I have no idea how to start.
Also, the displayed dialog needs to keep track of the currently selected item (i.e. a Form, or a control within a Form) and read it's properties (color, text, etc.).
I have looked over the articles discussing add-ins, but they don't address my situation. Any help would be greatly appreciated.
Thanks.
|
|
|
|
|
Hi,
Here is the part of the EXE code:
if (FAILED (CoInitialize (NULL)))
{
return FALSE;
}
...
...
HRESULT hr;
IWebBrowser2* pWebBrowser = NULL;
hr = CoCreateInstance (CLSID_InternetExplorer, NULL,
CLSCTX_LOCAL_SERVER, IID_IWebBrowser2,
(LPVOID*)&pWebBrowser);
====> hr is 0x80070005 - Access is denied.
This is happening only with Windows XP/SP2. On the same PC with SP1, it works fine also it works fine on W2K.
Can someone PLEASE help me to solve this issue?
Thanks
SenPy
|
|
|
|
|
Maybe you now need to CoInitializeSecurity() ?
XP2 now has a more secure web browser system and this is a good thing.
|
|
|
|
|
|
Hi
I have handle to window to activeX control i want to get Idispatch of
this control in other thread. I use following code in same thread to
get interface pointer but when i call same function in other thread
it does not work
void fn(HWND *h)
{
::CoInitialize(NULL);
CWnd *c=CWnd::FromHandle(h1);
LPUNKNOWN pUnk =c->GetControlUnknown();
::wsprintf(a,"%p",pUnk);
::AfxMessageBox(a,0,0);
if(pUnk)
{
LPDISPATCH pDisp=NULL;
pUnk->QueryInterface(IID_IDispatch, (LPVOID*)&pDisp);
//doing some function with idispatch
}
}
this function works fine in one thread but in other thread it return
Iunknown pointer NULL. If any body knows solution plz reply me as
soon as possible. Remember i am not working with control that
register themselves i mn working with MSFlexGrid control.
Thanx in advance
Danish Ali
|
|
|
|
|
in one thread all is fine because u are in one apartament. to access interface in another thread i use COM marshaling. CoMarshalInterThreadInterfaceInStream<->CoGetInterfaceAndReleaseStream functions or GIT table.
but i didn't use it on remote threads. hm. maybe this is the part of sollution.
4apai
There're no impossible tasks. There're tasks that required infinite period of execution time.
|
|
|
|
|
thnx for reply but what u r saying is good when i m creating
my own controls but i m not creating new ActiveX control. I m using the one that already exsist like MSFLEXGRID and others......... it is not necessary that i should access it from other thread but if i can access from the same thread it is also fine i m basicaly injecting code in running process to get the properties of activeX control ......... Recently i got succeded it through subclssing but the code i use was of MFC so it was working fine on applications build in MFC but it is not working on other application like the ones build through VB I was accessing the same control MSFlexGrid but it doesnot work there.....
Plz reply ASAP
|
|
|
|
|
Hi, I am a little new to the code project. Any way, I have Windows ME and do not have the Microsoft .Net FrameWork. I was wondering if their is a program that can notify me when i get new mail. I would like it if it can surport 2 gmail acounts(My Father and I have one gmail account each and we share the same computer). I would like it to stay in the System tray. I will give a gmail invite to the one you can find a program that I can use. Thanks
|
|
|
|
|
Wrong forum ?
I believe this should be going in the lounge, no?
|
|
|
|
|
may be he like to go for GMAIL forum
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
I use IGraphBuilder, IVideoWindow and IMediaControl to create simple video player. I assume it's window to desktop window so there's a problem. How can i show all items that were on desktop in my video player window(make them popup) and save their functions(run,rename,...)?
Can somebody help me pleace.
|
|
|
|
|
Hello!!
At the beginning I'd like to apologize for posting on group that doesn't fit this subject, but I haven't found any that would fit it.
I am looking for informations, hints or source codes about how to display system resources (cpu load, mem usage...) on active desktop.
I know that I need to use WMI for it and I have found documentation about the WMI on MSDN with WScript example that shows cpu load, but I don't know how to put those informations on a web page (active desktop) and refresh them continuously.
Could anybody help me?
Best regards,
Marcin
|
|
|
|
|
Does anyone know how to convert the HRESULT into something readable?
The obvious approach: FormatMessage(.....) gives the description than can be understood by any normal human!
|
|
|
|
|
hi,
Do Some Googling On HRESULT.
there are two MACROS SUCCESS, FAILURE,
Once U Get The HRESULT, u Extract Severity code,Error code tec...
go through
"http://www.codeguru.com/Cpp/misc/misc/system/article.php/c3859/"
by
baijumax
|
|
|
|
|
_com_error err(hResult);
CString strError = err.ErrorMessage();
Thanks
|
|
|
|
|
|
I've developed a component (.dll file) on my desktop computer using VC++ 6 running Windows XP SP1. When I run regsvr32 on the the desktop computer, the .dll registers and I'm able to access the component from a client program.
When I attempt to register the same component on a laptop computer (also running Windows XP SP1), regsvr32 runs quietly (not showing a "DllRegisterServer in file.dll succeeded" message or any other message), the .dll doesn't register and I'm not able to access the component from a client program.
Does anyone know why this could happen?
If I run the regsvr32 command in a batch file (on the laptop), %ERRORLEVEL% gets set to 3. Anyone know where I could find out what that might mean?
-Rob
__________________________________________________________________________
....you guys start coding and I'll go ask them what they want it to do....
|
|
|
|