|
OK ,I'll check it out, thanks!: )
xushenxin
keep fighting and you will win!
|
|
|
|
|
try to use atl com, create an internet browse object
for more detail ,plz check the msdn.
|
|
|
|
|
Hello:
My first post so apologies if I've put this in the wrong place or broken some (n)etiquette.
I'm using a grid control .ocx file from inside an MFC app; all C++, built under VC++ 6.0. It has worked fine since
1999 but now is starting to cause problems on Win2000 machines (shows up in all service packs). The identical code works fine under Win98, so I'm guessing it's an upgrade issue.
All the dialogs I try to launch via the ocx fail with the following error message in Visual C++ 6.0 (cut and pasted from the Debug window):
CoCreateInstance of OLE control {A8C3B720-0B5A-101B-B22E-00AA0037B2FC}
failed.
>>> Result code: 0x80040154
>>> Is the control is properly registered?
Warning: CreateDlgControls failed during dialog init.
The control is registered properly via regsvr32 before running the app.
The above error message appears on the call to:
hWnd = ::CreateDialogIndirect(hInst, lpDialogTemplate,
pParentWnd->GetSafeHwnd(), AfxDlgProc);
in CWnd::CreateDlgIndirect(), called from CDialog::DoModal() in the usual way.
The behavior seen in release versions is that no dialog appears in response to user action (menu choice, etc).
I know next to nothing about COM/ActiveX/OLE objects, so if there's either a quick fix, or an explanation why this would happen (so I can stop the wild goose chase), I'd appreciate it.
The original supplier of this commercial ocx can't supply an update.
I hope this is enough info; it's all I can share.
Thanks,
-Chuck.
C J Charbonneau
Ottawa, Canada
|
|
|
|
|
I'm implementing a web navigator application and I'm currently working on the history items. Does anybody know how I can get the URL pointed to starting from the item pidl ?
Thanks in advance,
Yarp
http://www.senosoft.com/
|
|
|
|
|
Does anyone have any idea how long COM/VB6(classic) will be supported. Will .Net dump COM in the next generations of operating systems.
Paul Roullier
Senior Developer
|
|
|
|
|
Whilst there is still a Win32 API there will be COM support. COM is used in too many legacy systems for Microsoft to pull support. Backwards compatability has only been one of MS's greatest strengths.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
Hi,
Can any one help me how to change the display name of components.
Like in ODL file, the syntax is:
[uuid(.......), version(1.0)]
library MyComponentLibrary
{
.......
In this case the display name of my component is "MyComponentLibrary" but i want to change it to
"iZ imaging Toolkit 2004 R1.0".
Please reply me soon if you have any suggestions.
rgds,
Rana
Dosti ke bhi kuch andaaj hote hai,
jagti ankho main bhi kuch khwab hote hai,
jaroori nahi ki gum may hi aansu nikle,
muskurati ankho main bhi sailaab hote hai...
|
|
|
|
|
Use the [helpstring] keyword.
[uuid(.......), version(1.0),
helpstring("iZ imaging Toolkit 2004 R1.0")
]
library MyComponentLibrary
...
With best wishes,
Vita
|
|
|
|
|
Thanks Victor,
But it does not work.
When i register my component, its display name is still "MyComponentLibrary".
pls put ur comment ..
rgds,
Rana
|
|
|
|
|
So what is your "display name"?
Dim obj As MyComponentLibrary.SomeObjectFromLib ?
Or the title in some Dialogs "[ ] MyComponentLibrary" ?
As far COM, the "library MyComponentLibrary" gives the name of library. It cannot be changed, but only by new name.
With best wishes,
Vita
|
|
|
|
|
Like in Visual basic,
Open the menu Project->References.
In References dialog box the Display names of components are different than their library names.
I just want to know how can i change that name in the References dialog box.
rgds,
rana
|
|
|
|
|
With [helpstring] of the library statement of IDL(ODL). When I make such change, I will see it in VB project.
Hm... I see that the VB saves the name in own project. It needs for the showing of missing references. Though the VB rechanges these names before saving or opening the project.
With best wishes,
Vita
|
|
|
|
|
Hi,
What Victor mentioned is correct. Modifying the helpstring in IDL/ODL, will reflect in the tlb listing dlg. If you are not getting it, might be somthiing else is wrong.
best wishes..mil10
|
|
|
|
|
Does anyone have a small C++ example on how to use the Image Mastering API (IMAPI) in Windows XP?
In what file does the type library appear in? There is an executable called imapi.exe in the System32 directory but it does not contain the type library.
Regards
Martin
|
|
|
|
|
Hi,
When I use the following code to create an instance of Internet Explorer, the top window seems to lose focus.
HWND hForegroundWindow = GetForegroundWindow();
CLSIDFromProgID(OLESTR("InternetExplorer.Application"), &clsid);
CoCreateInstance(clsid, NULL, CLSCTX_SERVER, IID_IUnknown, (LPVOID*)&pUnk);
pUnk->QueryInterface(IID_IWebBrowser2, (LPVOID*)&pWB);
pUnk->Release();
SetForegroundWindow(hForegroundWindow);
When CoCreateInstance function is called, the top window loses it focus, and invisible IE seems to receive the focus.
I get the handle to the foreground window and set it back after CoCreateInstance is called. However, i still do lose focus in that couple seconds. This is particularly annonying when i am tying something. Because when the top window loses its focus, the input will stop. Is there anyway to make it so that when CoCreateInstance is called, the foreground will still keep the focus?
Thanks
|
|
|
|
|
Hey everyone...
I have been trying to find some documentation on how to access contact (name, e-mail, phone, anniversary, etc.) info within Outlook Express. I am currently able to get at data using a typelib for Outlook 2000 and XP, but alas, it doesn't work with Outlook Express.
Does anyone know if there is a typelib avaialble, or if there is some documentation somewhere that would help me get started?
Thanks...
Brigg Thorp
Software Engineer
Timex Corporation
|
|
|
|
|
Hello Brigg,
Well, you are certainly asking in the right forum. I'm assuming you know COM programming. you would need it to use my sdk.
What you are looking to do with Outlook Express is possible through 'undocumented' means. Please checkout my messageboard here. I'm working on a future CP article on this, but as of now, it's not meant for public distrib.
Cheers,
Hush,hush...
thought I heard you call my name now.
Kula Shaker.
Amit Dey
Latest articles at CP - Writing Word addins
Office addin
|
|
|
|
|
Amit,
Actually, I'm not that familiar with COM. I've been using a TypeLib with Outlook 2000 and XP, so it's pretty much just accessing member functions and variables within the MSO class.
Could you possibly point me to the "undocumented" means of accessing this data? I would like to take a look at how this is done.
Thanks...
Brigg Thorp
Software Engineer
Timex Corporation
|
|
|
|
|
Hi,
Can any help me how can i change the display name of a component.
Like in ODL file i have syntax as
...
[ uuid(), version(1.0) ]
library MyLibrary
{
...
But i want to display this component as "iZ ImageTool 1.0".
Can any one help me to find the MIDL syntax to support names other than the libname.
thanks!
|
|
|
|
|
I have observed a handle leak in a COM object which acts as both a COM client and a server. This object is responsible for starting and stopping other COM objects.
In an attempt to find the handle leak, I've written an extremely simple COM object (exe) that implements a very simple interface. I also have client code that creates the COM object, calls a method on the interface and releases the interface pointer. These steps are repeated a number of times. After releasing the object, the client pauses long enough to ensure that the server dies and goes away.
Using Task Manager, I watch the client's handle count increment by one each pass through the loop.
I'm looking for clues - anyone know where the handle leak occurs?
By the way, I also tried a client using smart pointers and observed identical results in terms of leaking handles.
Here's the client code:
ILeak *pLeak;
CLSID clsid;
CoInitialize(NULL);
CLSIDFromProgID(L"Atlsvr.Leak", &clsid);
for (int i=0; i<10; i++) {
CoCreateInstance(clsid, NULL, CLSCTX_LOCAL_SERVER, IID_ILeak, (void**)&pLeak);
pLeak->Add();
pLeak->Release();
Sleep(5000);
}
CoUninitialize();
Wayne
|
|
|
|
|
What does pLeak->Add() do? Is it adding a reference count to the object? If so, then your object never gets released....
I am by no means a COM expert, but I would assume that the CoCreateInstance init's the object with at least 1 reference on it. And at that point, the Release just brings the reference count back down to where it was created.....
Just a thought -- no expert here. It's been years since I did any COM, last one was doing OLE2 client/server stuff in the late 90s.
-p
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
In this case the poorly named Add method simply returns S_OK, so the reference count isn't affected.
By the way, I did discover that by moving the CoInitialize() and CoUninitialize() inside the loop, the handle leak goes away. At this point, I'm not sure that's feasible in the code I'm working on, so I'm still interested in finding another solution to eliminating the handle leak.
Wayne
|
|
|
|
|
Hi,
does anybody know how to download ActiveX from Apache Server and not from IIS. What should be the HTML Script and where should I put the ActiveX (dll) on Apache Server.
thanks
|
|
|
|
|
thanks I found the problem
|
|
|
|
|
Hi,
Please suggest regarding following trouble:
Create a COM component "InProcVB.dll" as in-proc DLL in VB exposing some interfaces and methods .
Write its client as "clientVB".
Write another COM component as "OutOfProc.exe" as out-of-proc exe server in VC. This has same
interface/class/InterfaceIDs/ClassIDs as that of "InProcVB.dll". This is written with purpose of
replacing "InProcVB.dll". And, the expectation is that client need not re-compile. (As defined by
rule "Location transparency of COM).
After developing "OutOfProc.exe", we unregistered "InProcVB.dll", and registered "OutOfProc.exe".
Executed "clientVB" without any change. It gave error type-mismatch. The error point was:
Dim objSrvClass as SrvClass
set SrvClass = CreateObject("Server.Class") --> Problem: Type mismatch.
If I change code as
Dim objSrvClass as Object
set SrvClass = CreateObject("Server.Class")
It works well.
Please suggest.
|
|
|
|