|
Perhaps more information on the nuts and bolts of how one actually *writes* this software may be helpful.. I have a step-by-step DCOM tutorial, where I build a simple server which says "Hello, world!" back to the client, may help put some of this in practical perspective...
The tutorials are written as a series of separate articles, called Steps, which cover the major breakpoints in the development of the system.
Step 1 of the tutorial for VC 6 is at
http://www.codeproject.com/com/HelloTutorial1.asp[^]
And Step 1 of the turtorial for Visual C++.NET 2003 is at
http://www.codeproject.com/useritems/HelloTutorial1NET.asp[^]
I tried to write the tutorials in Microsoft-ese, so you can follow along as if you were reading the Scribble tutorial. The VS.NET version is still a work in progress; that's why it's still in "Unedited User Constributions."
Not all the Steps have been written for the VS.NET version yet. But I am working on it!
Stay tuned!
Sincerely Yours,
Brian Hart
Department of Physics and Astronomy
University of California, Irvine
|
|
|
|
|
Hi everybody,
I need to implement Doc/View/Frame in an ActiveX control. I have tried to copy the code from a standart MFC Wizard generated SDI application in a standart Wizard generated ActiveX control, but it didnt work - all I could get was a bunch of crashes (for the document, I derived my class from COleDocument). Can anybody point me in the right direction. Any information is appreciated.
Thanks in advance,
Dennis.
|
|
|
|
|
|
|
I just wanted to day that I stopped finding a way to send this copydatastruct to load a new file.
I find it rather difficult to debug because I can't really see what going on in the bsplayer. And I found out that when I start BSPlayer with parameter file or playlist it also work, and that is sufficient for the moment.
Winspector is a nice tool to see the windows messages flying around, and I could see the pointer arriving in the bsplayer process, but it's unclear why it still does not work. I have tried converting the datapath string to a char[] array and ended it with \0 but nothing worked.
Next project will be a little C# movie player with DirectShow.
greetings, Bart
|
|
|
|
|
Dear COM programmers,
I hope somebody can give me some thoughts about a problem I have. I am a complete newbie at COM programming and desperately trying to write a DLL library for a simulation program I am using. The simulation program allows me to write a DLL library with user defined functions. Now my plan is to write a general DLL library, which calls MATLAB to do the actual work.
I am already using the MATLAB engine to let my DLL(simulation program) call user defined functions in MATLAB. But, I also need MATLAB to call functions in my DLL, from within the user defined functions written in MATLAB. For this I wanted to setup an out-of-process server within my DLL library.
I succeeded at writing an out-of-process server in a normal EXE application and I could let MATLAB call functions and transfer data to my EXE application. But my real question is how to write an out-of-process server in a DLL? Is it at all possible, because usually DLL’s are in-process-servers?
Kind regards,
Marcel Dijkstra
|
|
|
|
|
Hi
I think there was the option to write a COM-DLL and instead of load it into the client, you have the option to configure it just to be loaded as a surrogate, in a system proccess.
Have a look in the COM section, in COM Architecture. One of these articles explain how to configure the registry (i'm not sure about this, just trying to remember).
Regards.
|
|
|
|
|
Hi Gizzo,
DLL surrogate is the thing I was looking for.
I looked at the COM Architecture section and
found articles on MSDN.
I think this will keep me busy for some time.
Thanks,
Marcel
|
|
|
|
|
Hello People
I have an issues with Interface IDispatch->Invoke
hr = pDisp->Invoke(dispid, IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD, &dispparamsArgs, NULL, &excepinfo, NULL);
Thats how I define params which I passing into Invoke
//DISPPARAMS dispparamsArgs = {(VARIANTARG*)&pbstrXMLDoc, NULL, 1, 0};
or like this
DISPPARAMS dispparamsArgs = {NULL, NULL, 0, 0};
This is the actual method which I trying to load:
IRMGetLicense::GetSystemInfo
HRESULT GetSystemInfo(
BSTR* pbstrXMLDoc
);
Parameter pbstrXMLDoc [out] Pointer to a string identifying the system information.
Return Values
This method returns an HRESULT.
Return code Description
S_OK The method succeeded.
But everything happens not as I expecting. Do you have any Ideas why I getting this errors ? Or maybe I do something wrong ?
hr = 0x80020009 Exception occurred.
excepinfo = bstrDescription: 0x00176d24 "The parameter is incorrect.
Thank you.
--
Shaman Marakame.
|
|
|
|
|
Hello Shaman,
Just try the following parameters:
VARIANT vntArg;
ComBSTR bstrXMLDoc; //or BSTR bstrXMLDoc if you don't use ATL
V_BSTRREF(&vntArg) = &bstrXMLDoc;
V_VT(&vntArg) = VT_BSTR | VT_BYREF;
DISPPARAMS dispparamsArgs = {&vntArg, NULL, 1, 0};
//hr = pDisp->Invoke(dispid, IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD, &dispparamsArgs, NULL, &excepinfo, NULL);
Welf Wiest
|
|
|
|
|
Hi,
I'm opening a Word Document (that contains a Macro, which fires on startup) from a .NET app. I would like to stop any macro's from running, when the document is opened.
Any suggestions would be most helpful,
Rich
|
|
|
|
|
Open MS Word and Go to Tools - Macros and disable the macros you want to stop from running, and then restart MS Word.
Regards,
Rajesh R. Subramanian
SOME SOULS NEVER REST
|
|
|
|
|
Hello,
I try to get the disk writes (on a system partition or on a remote share) by particular running processes.
I try to make an API monitor for thoses processes but it seems complicated because I also need to get the written filepath names.
I don't how that can be possible to do..
Any hint would be greatly appreciated
|
|
|
|
|
|
Yes I need some kind of product like filemon,
Filemon can only works with administrative privileges. Furthermore I need to have it automated, to generate logs.
How does that program work ???
Anthony Brenelière
|
|
|
|
|
I faced a problem when calling the method Initialize of IpublishingWizard interface.
hr = ::CoCreateInstance(
CLSID_PublishingWizard,
NULL,
CLSCTX_INPROC_SERVER,
IID_IUnknown,
(LPVOID FAR *) &punk);
hr = punk->QueryInterface(
__uuidof(IPublishingWizard),
(void**) &pPubWiz);
if ( FAILED(hr) )
return;
wchar_t pszServiceProvider[128];
_mbstowcsz(pszServiceProvider, "InternetPhotoPrinting", sizeof(pszServiceProvider));
hr = pPubWiz->Initialize(pdo, SHPWHF_NOFILESELECTOR, (LPCWSTR)pszServiceProvider);
if ( FAILED(hr) )
return;
1. Wizard does not appear.
2. Initialize method always returns S_OK independently of parameters value.
|
|
|
|
|
Hi - I'm working on a similar problem with a crash after the wizard, but I did get the wizard to display. You need to use the AddPages method of IPublishingWizard (inherited from IWizardExtenstion) to fill an array of HPROPSHEETPAGE's, create a PropertySheetHeader with these pages, and call PropertySheet() to display. Let me know if this works for you.
hr = pIPublish->Initialize(pDataObject,SHPWHF_NOFILESELECTOR, L"InternetPhotoPrinting");
if SUCCEEDED(hr)
{
DWORD dwNumPagesAdded = 0;
HPROPSHEETPAGE hPropSheets[9]
hr = pIPublish->AddPages(&hPropSheets[0], 9, &dwNumPagesAdded);
if SUCCEEDED(hr)
{
psh.phpage = hPropSheets;
psh.nPages = dwNumPagesAdded;
psh.nStartPage = 0;
psh.dwFlags = PSH_WIZARD;
psh.hwndParent = NULL;
psh.hInstance = NULL;
PropertySheet(&psh);
}
}
Thanks,
-Denise
|
|
|
|
|
Hello, Denise!
Thank you for help. I tried your advice, but the window with Wizard did not appear, though PropertySheet returned normal result (-1). Do you have any ideas?
Thanks, Sergey.
|
|
|
|
|
i am new to COM programming so i was wondering if any proffesional COM programmers can help me here... i work for a game company and i need to implement a remote debugger for our Script Engine which is a LUA script engine. some one suggested me to use COM servers and clients for this. I dont have much knowledge of COM right now and im studying it right now. With the amount of knowledge i have i can imagine for this project i need to have a COM server which can provide two types of object model.. one debugger and one debugee... and then clients have to use these interfaces to send and recieve info... like for example for a BREAK command the script editor uses the debugger interface to send data to the debugee saying that i need to break at this line when ever ya reach and blah blah.. in exchange the application would use debuggee interface to call debugger to say that we have reached this line and stuff... does this architecture seem aright? i mean using COM...?? and then one more important thing is that there could be any number of interfaces alive out there.... is there anyway in COM to find how many debugee interfaces are running and then access them???!!! any suggestion and help is much appreciated.... thanks
|
|
|
|
|
Perhaps more information on the nuts and bolts of how one actually *writes* this software may be helpful.. I have a step-by-step DCOM tutorial, where I build a simple server which says "Hello, world!" back to the client, may help put some of this in practical perspective...
The tutorials are written as a series of separate articles, called Steps, which cover the major breakpoints in the development of the system.
Step 1 of the tutorial for VC 6 is at
http://www.codeproject.com/com/HelloTutorial1.asp[^]
And Step 1 of the turtorial for Visual C++.NET 2003 is at
http://www.codeproject.com/useritems/HelloTutorial1NET.asp[^]
I tried to write the tutorials in Microsoft-ese, so you can follow along as if you were reading the Scribble tutorial. The VS.NET version is still a work in progress; that's why it's still in "Unedited User Constributions."
Not all the Steps have been written for the VS.NET version yet. But I am working on it!
Stay tuned!
Sincerely Yours,
Brian Hart
Department of Physics and Astronomy
University of California, Irvine
|
|
|
|
|
I want to masking the word's SaveAs function,and the EditCopt EditPaste function.First,I build a ATL project, then input the needed library.I want to reload the SaveAs funcion,and EditCpopt EditPaste function,but I Don't know
how to write the above 3 function.
If anyone know how to do this,please tell me!
Thank you very much!
|
|
|
|
|
I want to Modify Microsoft Exchange database. Is there any component available for that purpose?
Tauheed
|
|
|
|
|
Hi all,
I wrote a server(VC++) having 2 COM object(A,B) & I want client application only can create COM object A and can not create COM object B. COM object B will be return by calling a function exported in an interface of COM object A.
For example, client application written by VB
Dim a = new A
Dim b as B
call a.getInstanceB(b)
call b.doSomething
Any body know what to do to make COM object B can not be created by client application?
Thanks a lot,
Tin Le,
|
|
|
|
|
As I've been curious about the same thing, I took this as an exercise, and
if you use ATL for your COM server, I have the solution for you.
ATL includes an object map in its implementation file that includes entries for each class the server implements. The map is located in the COM servers implementation file (named <project name="">.cpp) and looks like this
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_Creatable, CCreatable)
OBJECT_ENTRY(CLSID_IsNotCreatable, CIsNotCreatable)
END_OBJECT_MAP()
Change the object entry to OBJECT_ENTRY_NON_CREATEABLE of your non, creatable class.
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_Creatable, CCreatable)
OBJECT_ENTRY_NON_CREATEABLE(CIsNotCreatable)
END_OBJECT_MAP()
After this, the CIsNotCreatable coclass cannot be created by CoCreateInstance. (Take a look at the documentation of OBJECT_ENTRY_NON_CREATEABLE in MSDN).
To let the creatable class create an instance of the non creatable and return a COM pointer ot it, you can do like this
STDMETHODIMP CCreatable::CreateNotCreatableObject(IIsNotCreatable **obj)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())
HRESULT hr;
CComObject<CIsNotCreatable>* instanceOfNotCreatableClass;
hr = CComObject<CIsNotCreatable>::CreateInstance(&instanceOfNotCreatableClass);
if (SUCCEEDED (hr)) {
instanceOfNotCreatableClass->AddRef ();
*obj = instanceOfNotCreatableClass;
}
return hr;
}
|
|
|
|
|
|