|
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.
|
|
|
|
|
Hi there,
Anybody knows how to programmatically set the "Minutes until idle shutdown:" value in the Advanced Tab?
Ideas or link is highly appreciated.
CK
"Computers are like Old Testament gods; lots of rules and no mercy." -JosephCampbell
|
|
|
|
|
Anyone know where theres some good info on the audio side of DirectX?
I've read and understood most of the stuff that comes with the SDK, but are there any tutorials on using DirectX in say an audio sequencer?
Ta
|
|
|
|
|
|
I've created a COM component and now I want to install it. I've wrapped it up in an installable package using InstallShield. I can then choose to uninstall it using the Add/Remove software utility. If I want to uninstall it from another I write some code to unregister it like this:
HINSTANCE hModule = LoadLibraryA(szModuleFilename);
HRESULT (STDAPICALLTYPE *pfn)(void);
(FARPROC&)pfn = GetProcAddress(hModule, "DllUnregisterServer");
I can then delete the DLL and it's containing folder but that's not really satisfactory is it?
What's the best way of doing it? I guess there must be a way of emulating the call to the Add/Remove utility and I guess this is probably the best method. Anyone know how or have an opinion?
|
|
|
|
|
One solution is to run regsvr32.
Kuphryn
|
|
|
|
|
That's just the same as calling the code that unregisters the DLL - it doesn't uninstall the package. Say I had installed my COM server using InstallShield which had also created some registry entries, simply calling regsvr32 or the code above would result in the COM component being no longer registered but the registry entries would still exist and anything else that had been installed as part of the package like the containing folder etc.
|
|
|
|
|
Hi ,
I am searching for a good sample code or article that takes a tab delimited file as input and imports it prograamatically in an access database.I don't want to loop through all the records in the text file and then put them individually into access.I want to import the whole file programmatically into an MS ACCESS table.May be it requires OLE.
Any help will be appriciated.
Thanks and regards.
|
|
|
|
|
Hi,
BUlk insertion is not possible in MS Access, but u can do it in Sql Server, just chk out the documentation of BULK INSERT in MSDN, and use _ConnectionPtr to connect to datasource using ADO.
best wishes..mil10
|
|
|
|
|
I've been trying to add a new interface to my application, and for some reason, I keep getting the following error:
C2504: IWWAlmDBAck : base class undefined
I defined a new interface in an IDL file, and IWWAlmDBAck is using IUnknown.
I declare the interface in a header file, underneath a class called CWWAlmDBPrg, declaring it as public IWWAlmDBAck.
The error is pointing to the header file, saying that the base class is undefined. However, there are old interfaces defined under CWWAlmDBPrg, and no errors generated from that. Why is it when I add a new one, the error occur?
Below is my header code:
This is where I got the error, at IWWAlmDBACK
class CWWAlmDBPrg :
public IWWAlmDBConnection,
public IWWAlmDBInfo,
public IWWAlmDBTable,
public IWWAlmDBProviderSession,
public IWWAlmDBQuery,
public IWWAlmDBDetailed,
public IWWAlmDBConsolidated,
public IWWAlmDBCause,
public IWWAlmDBComment,
public IWWAlmDBDefaultQuery,
public IWWAlmDBTagStatus,
public IWWAlmDBEvents,
public IWWAlmDBErrorInfo,
//New Interface:
public IWWAlmDBACK,
public CComObjectRoot,
public CComCoClass<cwwalmdbprg,&clsid_wwalmdbprg>
{
public:
CWWAlmDBPrg()
Below is code from my IDL:
This is where I defined the interface IWWAlmDBACK:
//New
[
object,
uuid(2D65B748-6B53-45e5-A201-74D072F39045),
helpstring("IWWAlmDBACK Interface"),
pointer_default(unique)
]
interface IWWAlmDBACK : IUnknown
{
[helpstring("method LogAlmAckConsolidated")] HRESULT LogAlmAckConsolidated([in] int AlarmId,[in,string] wchar_t* AckTime,[in] int AckTimeFracSec,[in] int AckTimeZoneOffset,[in] int AckDaylightAdjustment,[in] int OutstandingAcks,[in] int AckCommentId, [in,string] wchar_t* AckOperatorName,[in,string] wchar_t* AckNodeName, [in] double User1, [in] double User2, [in,string]wchar_t* User3, [in] long Cookie);
};
//End New
I generated the uuid using guidgen.exe
I defined the interface in coclass:
coclass WWAlmDBPrg
{
[default] interface IWWAlmDBConnection;
interface IWWAlmDBInfo;
interface IWWAlmDBTable;
interface IWWAlmDBProviderSession;
interface IWWAlmDBQuery;
interface IWWAlmDBDetailed;
interface IWWAlmDBConsolidated;
interface IWWAlmDBCause;
interface IWWAlmDBComment;
interface IWWAlmDBDefaultQuery;
interface IWWAlmDBTagStatus;
interface IWWAlmDBEvents;
interface IWWAlmDBErrorInfo;
//New
interface IWWAlmDBACK;
};
Thank you!
|
|
|
|
|
The only thing I can think of is to make sure the interface is defined before it is used (i.e., defined before CWWAlmDBPrg) and that the header is included in the source file in which its used. Also, perhaps recompiling the IDL file before building the project would help. I had a similar problem once where the IDL file wasn't getting compiled automatically during the build, and I had to manually do it before the build process.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
Hi,
The IHTMLDocument2 interface has the method get_images(), which supposedly returns the images found in the document. But trough that interface I can only access the attributes concerning the images (e.g. height, width, border etc.).
So my question can I access the actual image data from somewhere. From IHTMLDocument2 or from some other related interface. I'm developing an ActiveX component which needs to alter images on pages.
"There is no reason for any individuals to have a computer in their home". Ken Olson, president and founder of Digital Equipment Corp.
|
|
|
|
|
There doesn't seem to be any way of doing this, short of hosting the WebBrowser control (or MSHTML) and handling the markup and rendering yourself, which I'm betting isn't an option.
Intead, what about displaying the image in your ActiveX control. That way, it would have exclusive control over the display of the image. MSN Photos used to have a print wizard that worked similar (they probably still do, but they went to strickly subscription-based usability so I can't use it anymore).
You could still get certain images on the page by getting their src attribute and downloading and displaying in your ActiveX. Just an alternative suggestion.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|