|
I’m developing a program that uses and depends on a “bought” dll. Everything worked until I got a new version of the dll and tries to use that one with it’s new shipping api.
It seams like, despite I run:
regsvr32 –u MyDll.dll
and then the new dll with the same name
regsvr32 MyDll.dll
the new dll can’t get used at runtime.
All tips are welcomed!!!
...and justice for all
APe
|
|
|
|
|
d00_ape wrote:
the new dll can’t get used at runtime.
This is too vague to be able to offer any assistance on. What do you mean by it can't get used?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
can’t get used at runtime
It crashes, when the program (should) call the dll
It actualy work on my developing cpu, so it's not wrong on the new dll.
Thanks
...and justice for all
APe
|
|
|
|
|
d00_ape wrote:
It crashes, when the program (should) call the dll
Technically, DLLs don't get called. They get loaded into the address space of an application, and then exported functions get called. So, is it crashing on the LoadLibrary() or GetProcAddress() call? If neither of these functions are being used, are you implicitly linking instead.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I run:
#import "MyDll.dll"
and here comes the faliure:
if( SUCCEEDED( hres = m_IPtr.CreateInstance("MyDll.Stuff") ) )
...and justice for all
APe
|
|
|
|
|
Does m_IPtr have a valid value? What values does CreateInstance() return?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
My code looks like this:
if( SUCCEEDED( hres = m_IPtr.CreateInstance("MyDll.Stuff") ) )
{<br />
*_teststream << "handle to connection open - hres (S_OK) = " << ITOA(hres) << endl;<br />
}<br />
<br />
LPVOID lpMsgBuf;<br />
<br />
FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,<br />
NULL, hres, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL);<br />
<br />
*_out << endl << "DEBUG INFO: HRESULT = " << (char*)lpMsgBuf;<br />
<br />
delete lpMsgBuf;<br />
And the output on the failing cpus is:
DEBUG INFO: HRESULT = Ogiltig klassträng
"invalid classtring" (or something in english)
...and justice for all
APe
|
|
|
|
|
d00_ape wrote:
if( SUCCEEDED( hres = m_IPtr.CreateInstance("MyDll.Stuff") ) )// Create intstance to component
Does "MyDll.Stuff" exist under the HKEY_CLASSES_ROOT registry key?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Are you saying this is a release only problem? Or that it only happens on a non-development machine?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
I've had the problem on my developing cpu but suddenly after a: regsvr32 MyDll.dll
it worked.
It might be a
Antony M Kancidrowski wrote:
release only problem
...and justice for all
APe
|
|
|
|
|
Um, If you use Depends.exe it will list the libraries that MyDLL.dll uses. Are they the same on both systems?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
New day with "dll-hell"...
Yeah, and I actualy tried it on about 5 other cpus and the same problem...
...and justice for all
APe
|
|
|
|
|
I think that your registry is corrupted. Try to use any tool to verify. You can find over internet these tools.
But, you can do it manulay.
- Verify if the class Id are the same.
- Backup your registry (Its corrupted, but just save)
- If are, look in registry for the all class Id and Interface Id for the Dll (Realy realy hard work), and delete All.
- Delete all temporary files (sometimes its works)
- Shutdown your system
- Try to install new DLL
- Registry new dll, recompile your program (Rebuild All)
- If not works, you have serious problem, may be, you should format your PC
Rodrigo Pinho Pereira de Souza
|
|
|
|
|
How do I get the class Id?
I've used Dependecy Walker and there all seems Ok.
...and justice for all
APe
|
|
|
|
|
- Registry your dll
- Look in registry for your DLL Name (MyDll.Dll)
- Try to search any entry like this {5EFCDACB-46BD-4904-B8AF-4DD75D5C0144}
- This is an example of GUIID
Its hard work .....
If you do it very well with attention, probably, you will get a success.
Rodrigo Pinho Pereira de Souza
|
|
|
|
|
Does the registration work? i.e. are there any errors reported back from regsvr32?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
Yeah, both the unregistration of the old one and then registration of the new one, works according to the success message...
...and justice for all
APe
|
|
|
|
|
We have a task creating a Scheduled Task in a Remote Machine. For this we are using the ITaskScheduler interface. Using this we are creating a Scheduled task which is working fine in the local machine. But when getting connected to the remote machine using the ITaskScheduler::SetTargetComputer() it is failing returning the error AccessDenied...
Please help if any possible solutions let us know...
If any clarifications feel free to ask..
Thanks
Ramakrishna.J
Softpro Systems ltd.
|
|
|
|
|
i think u must have certain privilages to create the scheduler on another machine.
please try with WMI. thats simple
mind is everything.
|
|
|
|
|
dear renjith_sree thanks for the reply
we are doing thsi one with WMI and VC++ and we have administrative previleges and providing user credentials while connecting to the Remote machine.thing is that we are able to view the list applications installed on remote machin ebut we are not able to create a scheduled task on remote machine.
Thanks
Ramakrishna.J
Softpro Systemsltd.
|
|
|
|
|
Per MSDN:
The current user on the remote computer must have administrative access to use this method. For more information on remote installation requirements, refer to Mstask.hlp.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
dear DavidCrow thanks for the reply
Yes the current user has administrative previleges.
Thanks
Ramakrishna.J
Softpro systemsltd.
|
|
|
|
|
Hi, I'm using Visual c++ and I've done a program where I've defined my own file format. I would like to be able to create file associations with my program with these type of files...lets say *.qif .
Anyone has any ideas how I could do this, so that when I click on a *.qif file, my program would load and on startup would load the specific *.qif file?
I'm not using a SDI or MDI. The program is dialog based, and the file format was generated from an edit box.
Thanks for any suggestions..
|
|
|
|
|
You can do the same thing that an SDI or MDI application does, call RegisterShellFileTypes() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
You need to write appropriate registry entries into the registry.
In the HKEY_CLASSES_ROOT, add the appropriate data excluding quotes
1) Add a key called ".qif"
2) Under .qif set the (Default) string value to "QifFile"
3) Add a key called "QifFile"
4) Under QifFile add a key called "shell"
5) Under shell add a key called "open"
6) Under open add a key called "command"
7) Under command set the (Default) string value to the commandline parameters of your application.
And basically thats that.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|