|
Hi,
Want to ask one more thing..
I have loaded the Admin.dll in my COM dll server. Is it possible that i can marshal pointer of my custom class from DLL Server to client for some specific processing or may u plz suggest any other possible approach for this case.
Thanks.
"I only fail when i give up "
|
|
|
|
|
Can anyone please help me or give me some sample code? I need to create an ATL COM service (not a DLL) which has a dummy interface.. say. add 2 numbers.. After creating the service, i want to register it as a windows service. Then i want to create a client which connects to this service and uses the interface.. (adds 2 numbers)
I have searched online and there is not a decent article which explains the process step by step... Any help in this regard will be very useful.
Thanks in advance!!!!
|
|
|
|
|
Hai all,
-> I have a "COM Server Exe" , with connection point.
->And I made my COM Object class Singleton by using
Macro "DECLARE_CLASSFACTORY_SINGLETON"
-> My Com Cleint is a Dialog Based Programme .I started 5 clients by
clicking on same exe.
-> Whenever the client starts , It will set up all the connection points
-> I am able to call a COM Method( for eg: my_ComFun() ) by clicking a
button on my dialog box
-> From inside my_ComFun() I am firing an event to my client .
implementation of my_ComFun()
/**************************************************************/
STDMETHODIMP CMyServer::my_ComFun(int i)
{
Fire_MyEvent(i);
return S_OK;
}
/**************************************************************/
->Whenever I am Firing events from my COM Server(Using function
Fire_MyEvent() ) , All my clients are
getting function calls , since my COM Server is a Singleton class.
* My Requirement is to prevent this broadcasting and direct the function
calls from COM to that specific client which calls the Servers my_ComFun(),
by keeping the COM Server Singleton.
Thanks in Advance.
George
|
|
|
|
|
Hello,
I've written an ActiveX for IE in VS2005 C# .Net 2.0.
It supports RfID and GPS via COM-Port.
On my machine it runs great.
Now I wrote a setup with VS 2005.
I think I'm to set "vsdrpCOMSelfReg" for registering.
But it doesn't work.
It accepts only "vsdrpCOM"
After installation I called it in IE. It dosn't work.
When IE is open and I want to uninstall it by setup - Setup say "no, is in use."
I think, I'm not so far from target?!?
Can anyone help me?
I didn't find an good artikel in the internet.
Thanks a lot.
Additional:
In my IE I see the ActiveX in AddOns, but as File is listed "mscoree.dll"
What's that?
"Herausgeber" / Publisher is emty.
Maybe, it helps you.
Thanks a lot.
|
|
|
|
|
how to create set up file in COM addins project. and how to install in client system. what r the requrements of clients system please urgent
send me important codes in the above projects
|
|
|
|
|
How To Load Google Toolbar For Dialog??
Google Toolbar ClsID:{2318C2B1-4965-11d4-9B18-009027A5CD4F}
Code:
bool CShowToolbarDlg::LoadIEToolbar( CString strCLSID )
{
CLSID clsid;
WCHAR wsz[MAX_PATH];
::MultiByteToWideChar(CP_ACP, 0, strCLSID, -1, wsz, MAX_PATH);
HRESULT hr = CLSIDFromString(wsz, &clsid);
if ( hr != NOERROR )
return false;
::CoInitialize (NULL);
IUnknown* puk;
hr = ::CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, IID_IUnknown, (void**)&puk);
if (FAILED(hr))
return false;
IDeskBand *pdb;
hr = puk->QueryInterface(IID_IDeskBand, (void**)&pdb);
HWND hBand;
if (SUCCEEDED(hr))
{
pdb->GetWindow(&hBand);
if(hBand == 0)
return false;
CWnd *pWnd = CWnd::FromHandle(hBand);
}
m_pReBar = new CReBar();
m_pReBar->Create(this);
CWnd *pWnd = CWnd::FromHandle(hBand);
if(pWnd==NULL) return false;
m_pReBar->AddBar(pWnd,NULL,NULL, RBBS_BREAK);
REBARBANDINFO rbbi;
rbbi.cbSize = sizeof(rbbi);
rbbi.fMask = RBBIM_CHILDSIZE | RBBIM_IDEALSIZE | RBBIM_SIZE;
rbbi.cxMinChild = 0;
rbbi.cyMinChild = 10;
rbbi.cx = rbbi.cxIdeal = 250;
UINT nCount = m_pReBar->GetReBarCtrl().GetBandCount();
m_pReBar->GetReBarCtrl().SetBandInfo(nCount-1, &rbbi);
return true;
}
Error:
pdb->GetWindow(&hBand);
if(hBand == 0)
return false;
Why hBand is NULL??
|
|
|
|
|
Hi
I’m creating one windows service in my own purpose
Using msxml4.dll.
The process of service is to fetch the data from exchange server through webdav SEARCH METHOD
When i use this coding in windows form normal button click event , it works fine,
When I convert into windows service, it throws the error
The coding is below
MSXML2.XMLHTTP objXMLHTTP = new MSXML2.XMLHTTP();
writemethod("After Initialize");
System.Xml.XmlDataDocument xmlDOMParams = new System.Xml.XmlDataDocument();
objXMLHTTP.open("SEARCH", strInboxURL,false,strAliasName, strPassword);
objXMLHTTP.setRequestHeader("Content-type", "text/xml");
objXMLHTTP.setRequestHeader("Depth", "1");
string strXML;
strXML = "" +
" = \'DAV:\'>" +
"" +
"SELECT \"urn:schemas:httpmail:fromemail\"," +
------------------
---------etc…
objXMLHTTP.send(strXML); // Error Raised
The Error Raised in when i send the xml query
Any suggestion,please reply
We are using c#
Regards,
Arunkumar S
|
|
|
|
|
|
Did you try with any other client(VC++)?
|
|
|
|
|
Ya i tried using VC++ it is working but not with VB(I used IDispatch implimentation in Server application)
VINOD
|
|
|
|
|
hr = CoCreateInstance(CLSID_WMEncoder,
NULL,
CLSCTX_INPROC_SERVER,
IID_IWMEncoder,
(void**) &pEncoder);
The above function return the class not reguistered.
What should I do?
"Success lies not in the result , But in the efforts !!!!!"
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|
amitmistry_petlad wrote: The above function return the class not reguistered.
What should I do?
Register it!
Run RegSvr32.exe from a command prompt and give the complete path to the server as command line argument. You'll probably find RegSvr32 in your system directory.
If the server is something you've bought, it should be registered by the installer if such exist.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
I have installed window media encoder sdk 9.
will take automatically should I have to register something
"Success lies not in the result , But in the efforts !!!!!"
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|
Since it seems like you didn't get any compiler errors, the CLSID for the server is defined somewhere in your project. Look it up.
Open the registry editor and try to find the CLSID below HKCR\CLSID.
If you're not able to find it there, the server is in fact not registered and you should probably reinstall the SDK again. If that doesn't help I don't know what to do besides contacting the support for the SDK, unless you know what files to register.
If you are able to find it, does it have an InProcServer32 key below it?
If it does, what does the default value of it contain? It should contain the path to the server and if it does so, can you find the server where it says?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
well ,thanks roger
but now creating new prob.
Can you have any idea about breaking the application and given the following error?
Unhandled exception at 0x7c910370 in DRMClient.exe: 0xC0000005: Access violation reading location 0x00000000.
before few times it was working nice then after one hour wehn i came back from lunch.
I ran it was give the breaking of application.
"Success lies not in the result , But in the efforts !!!!!"
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|
amitmistry_petlad wrote: Can you have any idea about breaking the application and given the following error?.....Access violation reading location 0x00000000
At some point you are dereferencing the NULL pointer.
Since your application uses COM I suggest you make sure that every interface pointer you use doesn't equal NULL.
Use the TRACE macro and print some debug info when you validate an interface pointer and it turns out to be NULL unexpectedly.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
I want to program a software with VC++.The function of my software is same as the MS's Remote Desktop Client.I want to use the wtsapi32.dll or mstscax.dll to code my software,but I don't know how to use them, What should I do? Could you give me some suggestions? Sample code is best.Thank you very much!
My Email:lipingliang231@163.com.
|
|
|
|
|
Hi,
Can any one expplain How to convert a CString to _bstr_t......
thanks in advance
Thanks a lot
|
|
|
|
|
One of the constructors of _bstr_t takes a const char* as argument. Since CString has a type conversion operator LPCTSTR that returns a const char* you can do the following:
CString str = "The string";
_bstr_t bstrTest( str );
bstrTest = _bstr_t( str );
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
[fx: pedant mode on]
Roger Stoltz wrote: Since CString has a type conversion operator LPCTSTR that returns a const char* you can do the following:
No it doesn't. It returns const TCHAR*, which in a UNICODE build won't be the same as const char*. However, _bstr_t has a constructor that accepts const wchar_t* as well as one for const char*, so it will work in either case.
[fx: pedant mode off]
Steve S
Developer for hire
|
|
|
|
|
Now you're just being picky Steve... but you're right of course.
However, I think the OP got the picture and depending on the OP's level of expertise it may have been confusing to start talking about unicode.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Of course I'm being picky. When you get to my age, it's one of the few pleasures left in life that doesn't cost money or end up causing some kind of muscular spasm...
I agree that it might have been confusing, which is one of the problems of CP. It's hard to know what level the OP is at (or in some cases, they think they're at), and that makes it difficult sometimes to give the 'right' answer, because they may end up worse off than before.
I did like the thread here[^] where someone else came in and finished explaining it while I was asleep
Steve S
Developer for hire
|
|
|
|
|
How can I create an empty DACL?
|
|
|
|
|
What do you want to do with it (apart from the obvious "put it into a security descriptor") ?
I'm sure there's stuff on MSDN about doing this, usually found by asking pointed questions about named pipes and such which are normally used by services, and the question is generally "why does it work when I run my server interactive, but not when it's a service"....
Steve S
Developer for hire
|
|
|
|
|
Hi All,
1). Which is the COM service that creates stub and proxy for out-proc-server COM objects?
2). What makes up the COM frameworks?
~Suraj
Suraj Gupta
|
|
|
|