|
Is it possible to create a driver as an ActiveX control/component in VC++ or even in .Net? If so, how can it be done? Thanks in advance.
Don't steal, the government doesn't like competition.
-Ron Paul
|
|
|
|
|
What do you mean "driver"? If it is a file like "*.sys". Then I think it is impossible. They are totally different concepts.
|
|
|
|
|
I apologize for not being more specific. I was thinking more along the lines of creating an interface that inherited classes/variables/properties from the ddk. I hope I described it better. Thanks in advance
Don't steal, the government doesn't like competition.
-Ron Paul
|
|
|
|
|
COM is used to design an interface. It does not require DDK. What do you want to use the interface?
|
|
|
|
|
Hello,
I am facing a problem with registry key. I have a MFC singledoc application with three splitters and lots of views. My registry key was set in InitInstance function by SetRegistryKey(_T("Local AppWizard-Generated Applications")). Everything works fine till the moment I try to change the string parameter in SetRegistryKey() function. When I change it I recieve many strange error during initialization and opening new document. Can you tell me what is going on? Thanks Tomas
|
|
|
|
|
Tomas(cz) wrote: I recieve many strange error during initialization and opening new document. Can you tell me what is going on?
Not without more information! Please post the portion of code that is failing, including the exact line where the error occurs, and the messages that you receive.
|
|
|
|
|
Thanks for your reply,
the error message is Unhandled exception at 0x7c812afb in Amason.exe: Microsoft C++ exception: std::__non_rtti_object at memory location 0x0012f314.. and it occurs in CFrameWnd::InitialUpdateFrame in function SendMessageToDescendants. I also recieved this warning Warning: failed to load indicator string 0x8017. When I change the registry key back to the original value, everything works fine...
Tomas
|
|
|
|
|
Hi,
I have a VC++ desktop application. It is an SDI application with some HTML views.
When I close the application and re-start the machine I m facing
BOOT FAILURE error. Then I give load the BOOT CD and select repair it things will work fine.
This is not replicable, but happens rarely that too in few machines.
When I turn on UAC and run my application with Standard Priviledge things are working fine.
System Event logs does not provide any clue.
Boot logs(ntbtlog) from system dir also didn't help.
How do I proceed?
Any help to resolve this.
Regards,
Karthik.
|
|
|
|
|
I suspect, your application is playing around with the system files.
That is why when you run with standard privileges, the application fails to do its stuff and everything is OK.
|
|
|
|
|
Hi
Please How to convert BSTR to AnsiString? thanks a lot
|
|
|
|
|
The easiest way is to use the _bstr_t class.
BSTR bstr;
_bstr_t _bstr(bstr, true);
const int size = 256;
char ansi[size];
strcpy_s(ansi, size, static_cast<char*>(_bstr));
|
|
|
|
|
thanks a lot, but it doesn't compile in C++ borland
regards
|
|
|
|
|
What would be the best way to read complete messages from a growing file in which each complete entry when written is linefeed terminated? Basically, I want to simultaneously read a file while another process is appending to it, then when I reach the end wait on any further data and return from the "read" only when there's a complete message to process.
I can write code that manages this myself, but just curious to learn if there's anything out there that can already do this.
Thanks
|
|
|
|
|
To simultaneously read and write to a file, you have to always open the file whether for reading or writing with the shared read and shared write access.
For reading till a linefeed you can use CStdioFile::ReadString[^].
|
|
|
|
|
Thank you so much. I'll give that a try.
|
|
|
|
|
I am calling MainFrame's RecalcLayout() to refresh while showing/hiding a dialogbar.
But this is causing a problem, status bar of application got hidden after RecalcLayout() call.
But If I minimize and restore application or resize it, status bar is appearing again.
I want to show status bar always... How to solve this problem?
Same post at msdn: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/d885ea7c-b61e-4550-8029-3d19521fd1bc
Thanks
--
"Programming is an art that fights back!"
|
|
|
|
|
Try calling UpdateWindow after RecalcLayout .
|
|
|
|
|
Tried UpdateWindow(), but no luck... Thanks
--
"Programming is an art that fights back!"
|
|
|
|
|
%s is for ANSI and %ws for UNICODE, but what is the TCHAR equivalent?
i.e.
printf("%???", _T("foo"));
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
sashoalm wrote: what is the TCHAR equivalent?
%s, assuming UNICODE is define'd for wide-character builds.
|
|
|
|
|
Hi .I am getting a WM_PAINT message for a window.
How can I find out where is the source of the WM_PAINT?
But from my regular code flow it is not being called. The window is not being invalidated manually / in code.
Debugging didnt help.
Is getmessageextrainfo() the solution?
In general for any WIndows messages is there a mechanism to find the function/ trigger which is the source of the messages.
|
|
|
|
|
Elsie wrote: How can I find out where is the source of the WM_PAINT?
From MSDN: "The WM_PAINT message is generated by the system ..."
Elsie wrote: is there a mechanism to find the function/trigger which is the source
No.
|
|
|
|
|
Wrong.
Of course you can get the source..
|
|
|
|
|
Not sure its possible but, Spy++ gives you a graphical view of the system’s processes, threads, windows, and window messages.
Using Call Stack[^] you can view the function or procedure calls that are currently on the stack but not the source of windows messages.
--
"Programming is an art that fights back!"
|
|
|
|
|
Elsie wrote: In general for any WIndows messages is there a mechanism to find the function/ trigger which is the source of the messages.
There are no documented methods to determine the source of a window message. However the InSendMessageEx Function[^] can be used to determine if your window is currently processing a message from SendMessage.
Anyway... your application needs to handle WM_PAINT as the system generates it. If you have Vista Aero/Glass enabled then your application may recieve a greater number of WM_PAINT messages and your window update region is not completely under your control.
Best Wishes,
-David Delaune
|
|
|
|