|
In StartServiceCtrlDispatcher documentation, MSDN says -
The process has already called StartServiceCtrlDispatcher. Each process can call StartServiceCtrlDispatcher only one time.
Are you doing anything like this?
S o h a i l K a d i w a l a
To Err Is Human; to Debug, Divine
modified 21-Apr-21 21:01pm.
|
|
|
|
|
How to create a custom Calendar control in asp.net web application??
please send me codes, methods or articles, creating calendar components creating calendar asemblies that can solve this problem... please..
|
|
|
|
|
I want to integrate outlook in an existing CRM. I think I have to make a outlook Addin for that.
I want to achieve certain things with it.
a. whenever some person emails there should be an automatic unique referece number generated for that email (a support ticket) and should be automtically sent to the sender.
b. audit trail of outlook messages
c. reporting
I am at loss to understand that how can I do these things.
An idea is to develop a web service and add in for outlook when executed should parse through all of the emails and send unique IDs to the senders or a webservice running in the background should do it automtically each time the user sends the email. once the emails are there then the addin should somehow expose the CRM database to the outlook client and the emails with associated attributes should be stored in a table at CRM... am I right???? and once its in table then reporting is not a big problem
am I on the right track
any thoughts on this,, I have this university project which I have to do ,, please help me
thanks
drequinox
|
|
|
|
|
Hello all,
I have another problem using navigate2 method of IWebBrowser2 interface. I'm tring to send a javascript function (the string passed is like this: "javascript:functionname()" ) from an activex control to internet explorer. The first time that I call Navigate2 all goes fine but IE don't release the resource. The others times that I'm tring to call Navigate2 the resource appears busy.
I'm calling navigate2 in this way:
<br />
locHR = locBrowser->Navigate2(&vaURL,&noArg,&vaTarget,&noArg,&noArg);
where
COleVariant noArg;<br />
COleVariant vaURL((LPCTSTR) "javascript:functionname()");<br />
COleVariant vaTarget((LPCTSTR) "_self");<br />
Is this the correct way to post data (through http_get) to IE?
Thanks a lot
Carlo
|
|
|
|
|
Hi cp-users,
I hope this is the correct message board to post this message...
I've a problem with Event Queue in my ActiveX Control. I'have generated some method to fire events to javascript. When I call MFC FireEvent (with same eventid) several time, javascript function is not called only one time per call but for the number of foregoing calls + 1. I suppose that I must clear the event queue manually but I don't have found any documentation in MSDN...
Thanks for all suggestion
Carlo
|
|
|
|
|
Not directly a COM-Question, but perhaps i get lucky.
I've got this function :
typedef struct
{
int size;
[size_is(size), string] char * text;
} whatastruct;
short saysomething( [in] handle_t hl,
[in, out, ref] int *size_msg,
[out, size_is(*size_msg)] whatastruct **msg);
My server-side implementation looks like this :
short saysomething(handle_t hl, int *length_msg, whatastruct **msg)
{
*msg = new whatastruct[*length_msg];
for ( int i = 0; i < *length_msg; i++ )
{
msg[i] = new whatastruct;
msg[i]->text = new unsigned char[25];
msg[i]->size = 25;
sprintf(reinterpret_cast<char*>(msg[i]->text), "Das ist der %d. String.", i);
}
return 0;
}
When i call it, the client crashes during unmarshaling after the return of the function. Can anyone help me or give me a hint ? Google isn't very helpfull on this topic, and MSDN isn't either...
|
|
|
|
|
Hello All,
I have little knowledge about MFC , I have been asked to convert my present MFC project to COM , so just started learning COM from Developer’s Workshop to COM & ATL 3.0 by Andrew. Book is good but feeling very difficult to understand ..can anyone help me like how to start with COM things and how to get started and anyone have any notes please pass it to me or any demo of COM projects please pass it to me, so that i can understand it better.
Thanking you,
Suresh.
|
|
|
|
|
|
Hi Sohail,
Thanks for the reply.. I will check them now.
|
|
|
|
|
Code Project is the best option for u ...select com as a beginner and u will fine some codes and basic knowledge of com ...andu may also search softlookup.com ....
|
|
|
|
|
Did you see Com on CodeProject
|
|
|
|
|
Open MSDN
Goto 'Search' Tab
Search for 'COM'.
Read 'From CPP to COM' first.
|
|
|
|
|
Hi all,
I am writing a COM server program. In that I created a interface "MyIDL". Here is the source.,
import "Unknwn.idl";
//My Interface
[
object,
uuid(E0985393-CD6E-4a1f-8737-C250238FC8FC),
helpstring("My Interface"),
pointer_default(unique)
]
interface IX : IUnknown
{
HRESULT Function([out]char *str)=0;
};
When I compile I am getting these errors.
1] error MIDL2311 : statements outside library block are illegal in mktyplib compatability mode : [ Interface 'IX' ]
2] error MIDL2096 : duplicated attribute : [helpstring] [ Interface 'IX' ]
3] error MIDL2096 : duplicated attribute : [uuid] [ Interface 'IX' ]
How can resolve this? I know these questions might be silly. But please anybody help me. So that I could learn COM Components.
|
|
|
|
|
Doesn't this[^] reply satisfy your answer?
|
|
|
|
|
No.,
You told you have to try on COM forum. Thats why I came here.
I tried as you said. That is working . Fine
Thanks.
|
|
|
|
|
Sakthiu wrote: No.,
Why ? Why you want go with the option that is obsolete ?
Sakthiu wrote: You told you have to try on COM forum. Thats why I came here.
Its always better to post in respective forums. That stops people annoying, you get quick and expert's input.
Sakthiu wrote: I tried as you said. That is working . Fine
|
|
|
|
|
My problem describes as follows:
A server module fires events through its COM interfaces.
For that the pointer to the interface is retrieved by GetInterfaceFromGlobal().
m_CPMTCritSec.Lock();
LPUNKNOWN pUnk = NULL;
DWORD dwGITCookie = (DWORD)(m_vec.GetAt(nConnectionIndex));
if (dwGITCookie != NULL)
{
IID iid;
GetConnectionInterface(&iid);
HRESULT hr = m_pGIT->GetInterfaceFromGlobal(
dwGITCookie, iid, reinterpret_cast<void **="">(&pUnk));
ATLASSERT(hr == S_OK);
}
m_CPMTCritSec.Unlock();
The client implements event dispinterfaces (IDispEventImpl) and establishs with DispAdvise() connections with the event sources.
When software starts up client and server are created, the server starts to fire events
and the client establishs connections and receives the events.
That works in most cases fine. But some times (10%) the software hangs.
The problem occurs always at the same situation:
the server is firing events and trys to get the interface pointer with GetInterfaceFromGlobal()
while the client trys to connect with DispAdvise().
|
|
|
|
|
I assume your client sits in an STA, so both client and server try to get to the same apartment and are locked out. You should not use a critical section in an STA!
|
|
|
|
|
Thank you for your reply! Unfortunately I forgot to mention that client and server are two different processes. So this couldn't be my problem.
|
|
|
|
|
I'm afraid this is still probably your problem. GetInterfaceFromGlobal must access the source apartment to create the required proxy.
|
|
|
|
|
Can you please explain my this a little more in detail ? I have a clue what you are meaning but I don't understand it exactly. The server access the client STA to create the proxy but what is the client doing exactly ? And where I shouldn't lock ?
|
|
|
|
|
I'm not sure exactly why you do things the way you do.
If the client calls DispAdvise, then why does the server go to the GIT? The server in this case receives a proxy for the client automatically, and should simply fire its events.
Can you please clarify?
|
|
|
|
|
Yes, you are right. During Advise we receive a valid pointer to the proxy object. But we fire events from other threads so we store all pointers in GIT.
|
|
|
|
|
I've read a few articles here on how to create shell extentions.
There is one question that I still havent found a answer for, so I hope someone here can help me out.
Is there any way at all to intercept file deletions? When using normal file-dialogs or the explorer gui and you click "delete" on a file (either by the delete-button or by using the icon in the toolbar). The usual "Do you want to move abc.txt to the recycle bin" appears. Now, is there any way to intercept the delete command and display a custom delete dialog? So far I've only come across examples that capture the event _after_ the file has been deleted, which in my case is waaay to late.
Now why do I want to do this? I'm writing a application that syncs selected files to a network drive. But if a user changes a file and happen to delete the file (by misstake) before the file has been synced. I want to show a custom dialog warning the user that the file havent been synced yet...
|
|
|
|
|
I think you need Copy Hook Handlers[^]
S o h a i l K a d i w a l a
To Err Is Human; to Debug, Divine
modified 21-Apr-21 21:01pm.
|
|
|
|