Creating COM server
Fri, 20 Jun 2008 23:00:52 +0530
Hi,
I am trying to create an in-proc COM server without using ATL or MFC.
I have implemented these methods
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppvObj);
STDAPI DllRegisterServer();
STDAPI DllUnregisterServer();
STDAPI DllCanUnloadNow();
and created the componet interface/class ...
|
How to pass in pointer to callback function through C API in COM
Fri, 20 Jun 2008 10:23:02 -0700
We have an API libary written in C and try to wrap it in a COM based component.
Some of those APIs requires passing in pointer to callback function as
argument.
I have a hard time to figure out how to pass in the pointer to callback
function in a C API for COM.
I have read some books about how to handle ...
|
Mapping IPC$ doesn't work for DCOM
Thu, 19 Jun 2008 03:45:18 +0530
Whenever I need to access a remote system which requires some
authentication, I preferred to use this command
net use \\<remote-system>\IPC$ /user:<remotesystem-login> <password>
I have been using this for over 3 years ( I don't know how I learned
about this)
It works fine if I want access shared files/ ...
|
How to call IHTMLDocument::** method in Win32?
Wed, 18 Jun 2008 05:58:04 -0700 (PDT)
HI,
I have a Win32 app. , not just a console app. I have got the MSIE dom
from a IE window, but when I call IHTMLDocument::elementFromPoint(), I
got the following error message:
An outgoing call cannot be made since the application is
dispatching an input-synchronous call.
What should I do now? ...
|
Access to IOlkAccountManager::EnumerateAccounts function
Wed, 18 Jun 2008 05:20:07 -0700
Hi All,
I want to know how to access EnumerateAccounts API (2003) exposed through
IOlkAccountManager interface. I am using Visual Studio 2005, VC++.
I have created the header files with the interface definitions and GUIDs. I
am using the following libs. mapi32.lib Edkguid.lib Edkutils.lib Edkmapi.lib
Ad ...
|
using OCX Contrl by importing its interface
Wed, 18 Jun 2008 01:34:44 -0700 (PDT)
Hi:
there!
I develop an Dialog-based application and wanna using an OCX
Control using #import directive(WIN XP SP2 + VS2005)
codes like following:
//////////////////
//#import "test.ocx" no_namespace
#include "test.tlh"
int _tmain(int argc, _TCHAR* argv[])
{
HRESULT hresult;
::CoInitialize(NUL ...
|
second solution
Wed, 18 Jun 2008 01:05:07 -0700
Brain,
The second 'solution' includes the most simple solution to grant launchpermission for unelevated process to the service. I think that detail might have caused trouble to Milan when he tried running the service under the SYSTEM account.
In addition the bug that VS2008 does not add the AppID key to the obje ...
|
|
|
Base64Encode HGLOBAL from clipboard
Wed, 11 Jun 2008 21:08:20 -0700 (PDT)
I am trying to base64 encode some binary data stored on the
clipboard. The resulting string will be stored in an XML file. The
data is a PNG image, and the string I get from ATL::Base64Encode seems
to be very wrong. The data on the clipboard seems to be fine, and I
believe that I am retrieving it correctly, b ...
|
solution by Microsoft
Mon, 09 Jun 2008 23:56:36 -0700
Microsoft proposes the following solution to the problem:
1) change the server to a 'Service' that will run under SYSTEM account. For a ATL COM server project, no source code changes are required for this. The only change is that the server should be registered with the /Service command line argument.
2) gran ...
|
Changed size of array in definition of external interface
Fri, 6 Jun 2008 06:49:01 -0700
Hello,
I am using Microsoft Visual Studio 2005, Version 8.0.507.27.42.
In my C++ project for server I have defined external interface for COM with
the following two methods:
[id(7), helpstring ("method GetArray")]
HRESULT GetArray(
[out] unsigned int *pLen,
[out, length_is(*pLen)] BYTE ...
|