|
George_George wrote: Do you mean struct is not automation compatible data type? If yes, I disagree. Please refer here. Struct with only primitive type members are automation compatible.
I disagree with you. From my (personal) point of view an automation compatible data type can be used by scripting clients. Well, the page you provided states clearly: "IMPORTANT: Structs cannot be used by scripting clients".
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi CPallini,
From scripting language point of view, I agree with you. Let me re-state my question to cover C++/VB client only.
Any ideas to my original question about code sync issue with C++/IDL?
regards,
George
|
|
|
|
|
George_George wrote: Any ideas to my original question about code sync issue with C++/IDL?
Nope, I may only suggest you to have a look at MIDL compiler generated files (if I remeber well a header file and a source one).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi CPallini,
Do you mean the _i.h file? It is for COM consumer to include the definition of the struct along with its GUID. Yes, it is updated with IDL file update, I have checked with that.
But we also need to use the struct in COM server (not COM consumer, and my question is about COM server side, not COM consumer side), for example, accessing its field and using the struct type as function parameter type or something. But seems the source files for the COM server is not including any struct definitions? My question is whether to add the definition of struct manually or there are some automatic ways to sync struct defined in IDL to server source codes? Any comments or ideas?
regards,
George
|
|
|
|
|
How a.dll inject into SVCHOST.EXE (process)
I produced a.DLL
|
|
|
|
|
|
Hope you're familiar with DLL Injection techniques[^]
You may have to adjust the privileges [^] of your application to open the generic service host process (svchost.exe).
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Hello everyone,
When creating ATL project for a STA component, ATL does not help us to generate message pump code like below.
For message pump code lik below, it is the responsibility of the component creator (e.g. the thread which calls CreateInstance) to write such message pump code?
MSG msg;
while (GetMessage(&msg, ...)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
thanks in advance,
George
|
|
|
|
|
I am using the listview control in win32(not in MFc) with checkboxes.
every thing is working fine , but I could not find the way to hndle the event when
I check and uncheck the check box of any row . how can I get that events(in win32 not in MFC).
Ashish
|
|
|
|
|
I beleive you need to handle the LVN_ITEMCHANGED notification for the list control.
In the messag eprocessing code, you can check to see whether the checkbox has changed state:
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
BOOL oldCheckState = ((pNMListView->uOldState & LVIS_STATEIMAGEMASK)>>12) - 1;
BOOL newCheckState = ((pNMListView->uNewState & LVIS_STATEIMAGEMASK)>>12) - 1;
if (oldCheckState != -1
&& newCheckState != -1
&& oldCheckState != newCheckState)
{
}
If you vote me down, my score will only get lower
|
|
|
|
|
Hello,
I used like
CString formatStr= _T("''hh':'mm'");
m_TimePicker.SetFormat(formatStr);
I am getting Hour and Minute. What is to spacify for am/pm?
|
|
|
|
|
You don't like the documentation[^], do you ? Look at the "Format Strings" table, a bit lower on the page.
|
|
|
|
|
use this
m_TimePicker.SetFormat("hh:MM tt");
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
Repost.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hello everyone,
I feel the only value of dispinterface is, we could explicitly assign dispid
for method/property.
- If we declare a customized interface derived from IDispatch and not define
dual, we can not explicitly assign dispid for method/property -- IDL grammar
does not allow this;
- If we declare a customized interface derived from IDispatch and also
marked as dual, we can explicitly assign dispid for method/property.
All of the above are correct?
regards,
George
|
|
|
|
|
There is a new way .NET .
More local variables mean higher cohensive
Less function parameters mean looser coupling
|
|
|
|
|
Thanks followait,
Anyway, I agree .Net is better. My original question is for COM/IDL, any ideas for my original question?
regards,
George
|
|
|
|
|
George_George wrote: Anyway, I agree .Net is better
Sure?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
But do you have any ideas to my original question? I still have some COM code to maintain.
regards,
George
|
|
|
|
|
I cannot figure out how an answer to your original question will help you in maintaining COM code
Anyway, I think that dispinterface attribute is always needed when declaring IDispatch methods and properties, regardless of the dual nature of the interface.
But it is only a guess, I'm not an expert about.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
There are 3 ways to provide IDispatch interface,
1. Expose interface say IX in QueryInterface, and marking IX dispinterface IDL;
2. Expose interface IDispatch directly in QueryInterface, and coclass implements IDispatch directly;
3. Expose interface say IX (and IX inherits from IDispatch) in QueryInterface, and making coclass implements IX (i.e. dual interface).
I think the differences between 1 and 2 is just we can use dispid property in IDL file if we mark an interface dispinterface, but can not use dispid property in IDL if it is not dispinterface.
Any comments?
regards,
George
|
|
|
|
|
Hey Gerge, you're again comparing quite different entities: dispinterface is a MIDL attribute, while IDispatch is a COM interface.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi CPallini,
It should be my description issue.
What I compare is, making an interface "dispinterface" in IDL, comparing with an iterface implementing IDispatch or dual. Have I made myself understood?
regards,
George
|
|
|
|
|
Hi All
How can i copy the folder data(it means Folder A have two File a1 and a2. And Want to copy full data of a1 and a2)?
Plz help me
modified on Wednesday, September 24, 2008 2:39 AM
|
|
|
|
|
You can use FindFirstFile/FindNextFile APIs or if using MFC you can use CFileFind class to find all the files in the folder and use CopyFile API to copy files one by one..
Does it help??
Regards,
Sandip.
|
|
|
|