|
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....
|
|
|
|
|
This is probably a dependency problem. Run the VC dependency walker (depends.exe), and check that all the dependencies for your DLL are present and correct. You can compare the result with your own working computer if you need. If any of the dependencies are missing, or not on the path, then it is likely that the DLL will not register.
|
|
|
|
|
Thanks, that was it. MFC Release DLLs were on the laptop, but not the Debug DLLs. regsvr32 registers a Release version of the .dll properly.
__________________________________________________________________________
....you guys start coding and I'll go ask them what they want it to do....
|
|
|
|
|
How can i check if a CLSID is valid or not without actually creating an object i.e without calling CoCreateInstance
and if CLSIDFromAppID function fails is it necessary that the AppID is wrong
thanks
|
|
|
|
|
Hello MailMonty,
One simple way to check whether a CLSID is valid is to check for the existence of that clsid in the registry under HKEY_CLASSES_ROOT.
Regards,
Bio.
|
|
|
|
|
Hello,
I'm hosting WebControl (internet explorer) in desktop application (C++/MFC, and/or C#). Application loads some html pages stored locally. Those pages contain some JavaScript code, which looks something like this:
function GetMYNAME () {
var win = window.parent;
while ( (win.MYNAME == null) && (win.parent != null) && (win.parent != win) )
{
win = window.parent;
}
return win.MYNAME;
}
This looks for object named MYNAME in all framesets of the page. I know how to communicate with JavaScript, I know how to call functions and to get my functions called from JavaScript, but I can't figure out how to do this. I'm thinking that I need somehow to put object named MYNAME into window hierarchy, but I don't have any idea how to do this. Through that object JavaScript needs to call some functions.
Can someone point me the right way?
I can't change that JavaScript because it's auto generated from many sources and the requirement is that it must look just like that. I found out that one can do what I want, but with window.external property, but that's not allowed.
|
|
|
|
|
Hey Guys,
I´m fairly new to COM and well .. here comes my newbie question!
I am programming in C++ and I am trying to add a toolbar to the mail window of Outlook, and I want to know the best way to go about it. My current thinking is to use the NewInspector event to add the toolbar to the window. But I´m wondering if there is an easier way - like to add it by default or something during OnConnection.
One other thing.. If the right way to go about it is to use the NewInspector event, what is its dispid? (I think thats what its called ) I swear I have turned every stone in MSDN and I can´t find it! I have tried Outlook Spy as well and its not there either. Is there any resource that contains the events and their respective dispids anywhere?
Your humble COM newbie.. Glad for any help whatsoever!
P.S By Dispid I mean the following piece of code in SINK_MAP.
SINK_ENTRY_INFO(1, __uuidof(Outlook::ExplorerEvents),/*dispinterface*/ (This number here), OnNewInspector, &OnSimpleEventInfo)
Karl Stiller
|
|
|
|
|
Check the OleView. It should be there under InspectorEvents.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Hi,
I am new to COM, and hope that this question is not too stupid...
I have a MFC application.
I've added to this application a com class, where the idea is to export some services of my application to another applications.
At first I made a dialog inside my application, and then in this dialog I made an instance of my COM Object - I get all kinds of services from my application using my COM oject Interface.
But the other scenario doesn't work as expected:
I ran my application.
Then I ran another client, which makes an instance of the COM object,then when it tries to access my application services through the COM interface, it fails.
I think that the problem is that in the second scenario (out-process client) the client makes another instance of my application, without the needed initialization phase.
The question is - how can I avoid it? And make it work
Thank You for the Help!!!!
|
|
|
|
|
What sort of relationship do you need between your MFC app COM out-of-process server, and your client?
You can change the relationship by tweaking the automation code inside CYourApp::InitInstance() in your server app. eg.
BOOL CYourApp::InitInstance()<br />
{<br />
................<br />
CCommandLineInfo cmdInfo;<br />
ParseCommandLine(cmdInfo);<br />
<br />
if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)<br />
{<br />
COleTemplateServer::RegisterAll();<br />
_Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE);<br />
<br />
return TRUE;<br />
}
You can tweak the relationship between the client and server using the second parameter to _Module.RegisterClassObjects(). REGCLS_MULTIPLEUSE means that the server can be called by more than one client. REGCLS_SINGLEUSE would imply a one-to-one relationship. REGCLS_MULTI_SEPARATE may be the one that you are looking for depending on the relationship.
You can read up on the REGCLS enumeration in the help files.
Hope this helps
|
|
|
|
|
Hi!
I'm working on a shell extension called ThumbView. I want to add image information in the Information box in the left, on web view, in windows xp explorer. I thought it was called a ToolTip so I overloaded IQueryInfo, but that's the yellow tooltip that shows when you hover your mouse over a file. So now I have 2 questions:
1) What's the interface for that Information box? Or at least a name, sine ToolTip is something else =/
2) Is there a list of different info's, that works with localization (ie it translates "size" to whatever language your winxp is)?
Thx!
/JP
|
|
|
|
|
Here's a pick to demonstrate what I mean, clicky[^]
I have the actual thumbnail working for PCX and TGA files. But I want to supply "Measure" (Mått), "Size" (Storlek), "Last changed" (Senast ändrad). Crash course in swedish :P So that's why I'm guessing that there's some standard names that works with localization. Last changed and Size seem to be supplied as default, but in reversed order compared to say GIF files.
Does anyone know how to extend that info box?
|
|
|
|
|
Hi, i've just created an ATL dll which houses a full control for activeX support.
Basically it's working ok.
However i need to run some code once the control has been installed successfully. (after Register server)
This control is windowless.
In an MFC based control i could use something like OnCreate() but i don't have a clue where to start here.
I basically need an event that gets called once the control is installed.
Please Help
Thanks in advance!!!
Carl
|
|
|
|
|
Why you won't use DllRegsidterServer of you module class for this purpose???
|
|
|
|
|
Because i need to physically attach to the file in 'Downloaded Program Files' to copy a resource from inside the control onto the user machine. The control does not appear until after the return of DllRegister.
Carl
|
|
|
|
|
Why don't you add a key to "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce" that will execute a function in your DLL, like:
rundll32.exe yourdllpath.dll,YourFunc_RunDLL
YourFunc_RunDLL must be declared in your DLL like this:
int YourFunc_RunDLL(HWND parent, HINSTANCE hinst, LPCTSTR params) {
return 0;
}
My homepage is down cos' I violated their Terms and Conditions.
|
|
|
|
|
Why don't you add a key to "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce" that will execute a function in your DLL, like:
rundll32.exe yourdllpath.dll,YourFunc_RunDLL
YourFunc_RunDLL must be declared in your DLL like this:
int YourFunc_RunDLL(HWND parent, HINSTANCE hinst, LPCTSTR params) {
return 0;
}
You may need to tell the user to restart his computer for this to work. I know there is a system function you can call to make the OS execute the RunOnce entries, but don't have that in my mind right now!
My homepage is down cos' I violated their Terms and Conditions.
|
|
|
|
|
Hi all.
This snip of code from my appl.
Thats here not right.
///Try to Create IPicure interface for particular icon
IPicture* CConnect::CreateIPictureFromIcon(WORD hIco)const
{
HRSRC res = FindResource(_AtlModule.GetResourceInstance(),MAKEINTRESOURCE(hIco),RT_GROUP_ICON);
HGLOBAL hGlobalRes = LoadResource(_AtlModule.GetResourceInstance(), res);
LPVOID pvResData = LockResource(hGlobalRes);
size_t len = SizeofResource(_AtlModule.GetResourceInstance(),(HRSRC) res);
HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE,len);
LPVOID pvData = GlobalLock( hGlobal );
memcpy(pvData,pvResData,len);
GlobalUnlock(hGlobal);
GlobalUnlock(hGlobalRes);
LPSTREAM pStream = NULL;
IPersistStream* IPersStream = NULL;
HRESULT hr =
CreateStreamOnHGlobal( hGlobal,TRUE,&pStream );
//hr == S_OK
IPicture* pPicture = NULL;
//////////!!!!!!!!!!!!!!!!!!!!!//////
//All fine till this place
//hr return E_UNEXPECTED
////////////////////////////////////
hr = OleLoadPicture(pStream,0,TRUE,IID_IPicture,(void**)&pPicture);
pStream->Release();
return pPicture;
}
Please help!!!
|
|
|
|
|
I am trying to code a (Visual Studio)C# test program in order to control an ActiveX component. The connection between the component and my test program is done.
The component exposes methods that use a parameter System.object. I don't know how I should make such a parameter. In the activeX component (coded in C++), this parameter is described as a pointer to a DISPATCH object (a IDataContainer type). As I'm quite new to COM and ActiveX, and I haven't found any information about how to make this function call?
thanks in advance,
See you,
SlY
|
|
|
|
|
Hope you know how to handle variants,
First, use a VARIANT as input parameter,
Then, check that input field type is Dispatch type
Next, QueryInterface the dispatch member of the variant field
Sorry, no time for sample, im at work.
|
|
|
|
|
Can someone point me in the right direction for creating download progress information while an activeX control is installing. presume it's some kind of callback but would appreciate some help.
I've used similar Callbacks for standalone apps, but not sure how the connections is made as i want information about myself as i'm downloading.
hmmm - Confused!
thanks in advance
Carl
|
|
|
|
|
Hi, I've created an ATL control with a full control (activeX) added to it.
It is downloading and registering properly, but Internet Explorer says the control is NOT marked safe for scripting. I've doen this with an MFC based control but don't know what to do for my ATL version.
Please Help
thanks
Carl
|
|
|
|
|
I found this one myself
http://support.microsoft.com/default.aspx?kbid=168371
thanks (2 myself)
|
|
|
|
|
Hi!
At this time I’m only using the ActiveX technology to publish my MFC application on the net. I’m about to make a call to may webpage like this:
http://www.mypage.com?user=bill&password=12345
How may I pass the “user” and the “password” into my ActiveX?
All suggestions are helpful.
_____________________________
...and justice for all
APe
|
|
|
|
|
how do you access your activex object ?
is it using the < object > tag ?
if so, how about you use the other tags that it can use (i cant remember the syntax)
< param user='< %=Request("user")%>' >
< param password='< %=Request("password")% > ' >
if you instantiate your control server side:
< %
myActiveX = new ActiveX("MyProg.Id");
myActiveX.User = String(Request("user"));
or
myActiveX.SetUser(String(Request("user")), String(Request("password")));
% >
my script code is in JScript since this is the flavor i prefer, but the same can be achieved using VBScript.
|
|
|
|