Answer Questions
Vinay Bhat MSFT coding to get my system information
hi i want to find out the following things of my system: system name system manufacturer system model system type total physical memory available physical memory user name please tell me the coding to find out these things,its so urgent The following articles might help : http://www.codeproject.com/system/system_information.asp http://www.codeproject.com/system/computerinfo.asp ...Show All
pcdoc4christ problem uncovered
I have a VC++ MFC application in VS 2005. In this application I use CPropertySheet's in several locations. The program works fine for a while, but at some point the CPropertySheet's stop working, in such a way that when I click on a CPropertyPage tab, the tab for that sheet disappears completely or the controls on that CPropertyPage are all invisible. I'm guessing that I'm running out of resources, handles, me ...Show All
BerndMei Exception within ATL when creating dialog
Hello, Sorry if I'm bothering too much. I've gotten great help from here before. Here's the situation. I'm using Visual C++ 6.0. Within my IShellView I have a memberpointer to a dialog class that implements the CAxDialogImpl dialog. When the view loads I create this dialog dynamically by these lines: m_pDialog = new CIsdSpreadDialog; m_pDialog->Create(m_hWnd); m_pDialog->ModifyStyle(WS_DLGFRAME | WS_BORDER | WS_T ...Show All
AbhijitB GetParent broke...
GetParent doesn't return the correct HWND for a pop-up dialog box created with DialogBox it seems. GetParent always gives the root window handle in a dialog procedure instead of the correct owner. void Test( int test) { char blah[10]; itoa(test, blah, 10); MessageBox(0, blah, "Test", 0); } LRESULT CALLBACK ChildDlgProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { &nbs ...Show All
jptorres Newbie DLL question
I have written a C# class and compiled it as a DLL. I am now trying to use some of the methods in a Visual C++ project (not .Net). Is this possible Thanks for your reply. I've generated a tlb file, and added #import "SimpleDll.tlb" to the top of my C++ program, and it compiles fine but I'm not sure how to instantiate and use the object. Just wondered if anyone had any links to tut ...Show All
mary_l Interop and Video For Windows
Hello, I've written a library that uses the Video For Windows interface a long time ago. Back then, I didn't realize that interfaces were defined and that the functions were "C wrappers" so I used the C functions. I.e. I've been using AVIFileOpen instead of IAVIFile interface. I am trying to migrate to C++/CLI now and I am having a problem. My class looks something like: ref class MyVfw { public: IAVIFile *iavf; }; However, this create ...Show All
loonysan Very simple webserver code
I am making a very simple webserver -it does not need to have any sort of cross-platform compliance, it simply needs to work with IE6. I have the following code which is simply supposed to read in a web page stored on the disk and serve it to the client. Code follows (I cannot figure out how to format the text.. it's ugly): void SendLogin ( int clientNum ){ ifstream file ( ".\\HTM\\login.htm" ); if ( file == NULL ) re ...Show All
lin geng Python Makefile Actions failing
The following Python script: from subprocess import * Popen("notepad",stdout = PIPE) executes as expected when run from a command line. However, if I setup a makefile project action to invoke the script, I get an error when I try to build/rebuild/clean the project: Performing Makefile project actions Traceback (most recent call last): File "c:\Documents and Settings\Josh Petrie\Desktop\basic\trunk\bs\test.py&quo ...Show All
JohnGriswold _inp/_outp Functions
I want to read and write the parallel port. I looked up _inp/_oup at http://msdn2.microsoft.com/en-us/library/y7ae61bc.aspx . In the remarks section it says that _inp/_outp "might not be used in user code in...Windows XP". However, WinXP is listed as being compatible. So, can I or can't I use it Are there dangers in using _inp or _outp VF VFaul wrote: I want to read and write the ...Show All
Blaine Anderson Windows Services Tutorial / Examples
Can anyone recommend some good tutorials / examples on creating Windows Services. I would like to use C++ and avoid C#/VB as much as is possible. Additionally, is it possible to control a Windows Service from an external program I have seen some examples of this using the event log to pass commands but never anything that actually works. Thanks Rick I recommend this article: http://msdn.microsoft.com/librar ...Show All
annh VC8, Adding __event to non-CLR code gives error C2712
In a non-CLR class I have a number of __events defined. When compiling the source code in which the corresponding header file has these __events, I receive the error: error C2712: Cannot use __try in functions that require object unwinding pointing to the last of the __event lines in my header file. When I look at the error message it says: "cannot use __try in functions that require object unwinding". Further it is mentioned that "object unwind ...Show All
Scott.B Dialog Resizing in Japanese XP
In an 8-year old MFC/MDI project under Visual C++ 6.0, I use the default 8-Pt. MS San Serif. For the first time I have heard from a Japanese XP customer that the dialog is being resized and labels are being shifted and/or truncated. Experimentation showed that I could easily reproduce the behavior just by changing font dialog. I assumed that XP was replacing an unknown font with some more universal font. However, 8-Pt. MS ...Show All
schaneville STDMETHODIMP
I am trying to compile some VC++ 6.0 code on VC++2005, and I get the following error: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int The line of code is simple: STDMETHODIMP Func(WORD Index); Knowing that STDMETHODIMP boils down to " LONG __stdcall ", what's the problem here The same compiler error is generated for STDMETHOD. Any clue Thanks, Mo ...Show All
ati9200 Visual C++ 2005 Beta 2 - can't edit files
After getting a BSOD my VC++ 2005 project or something else got corrupted. All the source files are Ok, but whenever I open one, the backspace, enter, delete, page up, page down, arrow keys. etc. don't work, but I can type letters. If I try to recompile, eveything suddenly works, until I open another source file. I really don't want to make a new project file, I have many hundreds of files and a big file hierarchy tree, which will take ages to r ...Show All
ojohnson 'cli::array<Type> ^' to 'void *'
Hello Everyone, thats how it looks cli:: array < unsigned char > ^passwordHash how can I convert to void *, I'm passing to a function which looks like this... int sha_hash( const void * init_data_ptr, int data_length, void * buffer_ptr, int buffer_length, void * prefix_ptr, int prefix_length ) Its gonna get sent as (void * buffer_ptr) Any help really appreciated... Thanks, Ha ...Show All
