|
It could be; I don't know for sure. I think PDB files are intended to be used in debug mode, which isn't optimized.
|
|
|
|
|
Thanks Alan,
You have reproduced the same issue I mentioned?
regards,
George
|
|
|
|
|
I'm not sure what you mean. I was just giving you several suggestions that may help with your debugging.
Alan's First Rule of Debugging is: "Watch it happen."
Often the problem is not what we assume it is. Watch the bug occur either in the debugger, or by displaying variable values, possibly using the Lockbox Debugging Pattern.
Once you've seen the bug occur, then you can trace back to its cause.
|
|
|
|
|
Could you reproduce this issue I mentioned, Alan?
regards,
George
|
|
|
|
|
I want to connect a small numerical keyboard to my laptop computer. I would like to re-program the keys on the numerical keyboard, for example, when the user presses "/" I want that to be equivalent to pressing F1 on the regular keyboard. However, the regular keyboard should function as usual, that is, pressing "/" on the regular keyboard should type a "/"-character. Is this possible? If so, how do I implement it? Thanks in advance for any help.
|
|
|
|
|
If you are using an old-style "Y" splitter, I would say no.
If you are using a USB keypad, likely not, because of how the device is identified and used. At least, not without writing your own driver. It is entirely possible that the keypad was designed with USB hardware that was designed to send specific keystrokes (1-9 / * - + . ) directly to the system instead of sending generic keystrokes (key01 key02 key03 etc.) that are translated by some kind of driver to specific keystrokes.
If a serial one, it may have come with a tool to remap the keys. If not, then I believe a custom driver would be needed.
Note that writing a custom driver is not easy work, and you would need technical documentation on the specific device that you are using.
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
|
A hook would work -- but only if you could disambiguate where the keys are coming from. Without that information, you would not know of the key-press came from the normal keyboard, the keypad, a virtual keyboard (i.e. an on-screen keyboard or other input device, like Dasher[^]), etc, so you would not know if the key should be translated or not.
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
I seem to get identical values on the parameters (nCode, wParam and lParam) in the call to KeyboardProc regardless of which keyboard I use so I guess it is impossible to determine where there key event came from. Thanks anyway for your input!
|
|
|
|
|
Hello everyone,
I met with a problem when writing the experiment code. My issue is, how to sync code (e.g. struct definition in IDL and in C++ source files, like .cpp/.h).
Suppose I manually added the following code in IDL, then how to add the definition of struct and also the GUID mapping of the struct name into C++ source files (.cpp/.h)? Add them manually or there are some automatic ways which could add both struct definition in IDL and in C++ source files altogether?
(for primitive data type like int we do not have such issue, but for complex data type, we have such issue.)
[
uuid(96BF543D-58B2-480B-A484-253D8838EB42)
]
struct MyValue {
long x;
};
interface ITestStrcut1 : IDispatch{
[id(1), helpstring("method SetMyStruct")] HRESULT SetMyStruct([in]struct MyValue* value);
};
regards,
George
|
|
|
|
|
Hmm, That looks wrong. If you're going to pass your own structs through a COM interface then you'll need to do your own marshalling. Doing that in combination with IDispatch, which is primarily used for 'automation' compatible interfaces for ActiveX controls and cross language compatibility e.g. C++ & VB is not something I would even consider unless I had to. There are lots of ways of passing this data that don't involve such a clash of ideas, lookup SAFEARRAYs, VARIANTs and automation interfaces to see what I'm talking about.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Hi Matthew,
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.
Any comments?
http://vcfaq.mvps.org/com/4.htm[^]
regards,
George
|
|
|
|
|
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.
|
|
|
|