Answer Questions
Cammyr Conversion Question
Hi Folks; I'm running a WMI query to get the sizes of the disk drives in a computer. The result of course is a large number but I want to convert that number into a nicer format (i.e. 80G). So this is what I have thus far: oid GetWMITotal(HRESULT hres, IWbemServices *pSvc, char * sQuery, LPCWSTR sCol, char * data) { _variant_t varData; IEnumWbemClassObject* pEnumerator = NULL; ULONG uReturn = 1; IWbemClassObject *pclsObj; char cSuffix; int iStringOp = 0; hres = pSvc->ExecQuery( bstr_t( "WQL" ), bstr_t(sQuery), WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL, &pEnumerator); HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1, &pclsObj, &uRetur ...Show All
pino69 Reading the .rc files....
Hi All, I am working on a project migrating from VC6 to VisualStudio 2005 and also converting into Unicode. One of the task/program ( ConvertRC2DB) is to read the .rc file and store in database and vice versa. This program is runing great in VC6 and I am able to manage to compile the same in VC6/VS2005. It is working fine for the non-unicode .rc files. Whe you insert any chinese/japaneese char (unicode chars) and store the same .rc file then try to run against this program it is failing. ConvertRC2DB never handled the unicode. I want to know is there any API where we can query STRINGTABLE, MENU, DIALOG, DIALOGEX if not what is the best way to start coding to get this information. Thanks in adavance. I am able to figure out whi ...Show All
johnvms x64 application (VS 2005): error LNK2019: unresolved external symbol...
Hi: I am writing an 32 bit application using VS 6.0, compile and running successfully. However, when I open the same application with VS 2005 (Team Suite), compile the same application as x64 application for target running on x64 platform, it give me some error messages related to error LNK2019. I have changed the project properties -> configuration manager as x64, updated my own .lib files path at Additional Library Directories, but I get some error messages when i tried compile it. The error messages (LNK2019) show that it can't find the function that i am calling from my .lib files even though I already included .lib path on my project properties. I feel wierd because my application can compile very well in 32bit with VS 6.0 ...Show All
Dnieto23 winsock pop3 client
is it possible to make a pop3 email client using winsock if so could you get me started on how to connect to the pop3 server thanks in advance Hello Re: winsock pop3 client Such questions are outside the scope of this forum - for the scope of the VC General forum please look at: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=19445&SiteID=1 For such issues please use an appropriate newsgroup, potentially one at http://msdn.microsoft.com/newsgroups . OTP Thanks Damien oh sorry ...Show All
Kerstin VCRedist Problem
According to Microsoft our setup should look like this for winXP and above, C:\Test\helloconsole.exe C:\Test\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest C:\Test\Microsoft.VC80.CRT\msvcr80.dll C:\Test\Microsoft.VC80.CRT\msvcp80.dll C:\Test\Microsoft.VC80.CRT\msvcm80.dll If I do not need to install VCRedist.exe on the client system. My problem is that i have to place the dlls at some other location, so that my application folder will not have complex structure. Is there any way to create a manifest file and embed it into the application exe, that will allow me to place the dll's at some other location. -- Thanks & Regards, Sachin The answer is, you cannot. VC8 specifically pr ...Show All
Brian Kramer msvcr80.dll
i have a Com DLL project that is created on VC++ 2003 .i have converted this project to VC++ 2005 project.this project is running on VC++ 7.1 fine but when i compile on the VC++ 8.0 i get this error message;"LoadLibrary("project.ocx") is failed;specified module could not be found" then i have copied the MSVCR80.dll from "x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd" to "project Directory\debug" location.then i try to register using regsvr32.exe i get this message "Runtime Error program: c:\Windows\system32\regsvr32.exe R6034 An application has made attemt to load the c runtime library incorrectly.Please contact the application's support team for more informa ...Show All
kaizen warning LNK4248: unresolved typeref token (01000017) for '_TREEITEM'; image may not run
When compiling my program which is a windows app and not a DLL, I get this error message under Release mode but not in Debug. Furthermore I can get rid of the warning if I don't use managed extensions (remove \clr) in the project properties. Is there not some releases source code from Microsoft to allow the _TREEITEM and _IMAGELIST object to run in managed extensions I thought the goal from MS was to have us use the managed extensions and therefore I would think that this situation would have been resolved a long time ago. I've read the link where this exact same error is generated with a DLL but this is a standard windows app and therefore doesn't have a DLLMain code. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=7750 ...Show All
Geogy Possible problem with 2005 depenedencies and generating Qt project files with service pack 1
Our project uses Qt from Trolltech as it's main development environment. In creating our project, we generate the .vcproj files using their qmake system. Until service pack 1, I was able to create a solution file that referenced these project files and set up dependencies between those files. After updating to service pack 1, once I regenerate the project files the dependencies are no longer recognized. I assume this is due to the fact that qmake constantly regenerates the GUID for the .vcproj file and service pack 1 now actually takes this into account with the solution file (although this is a guess). Is this an issue that people know about (or have come across), and, if so, is there a solution to it (note this problem does not exist in ...Show All
abhishek_6023 using argc and argv in vs 2005
I building a c program which gets parmeters via argv in the main program I want to test it in the ide and not from command line where can i set the parameters from within the ide thx thx alot Go to Project Properties, Configuration Properties, Debugging and you can put the command line argument in the field "Command Arguments". ...Show All
Susan S How do a create a new text file, and how do I insert an eof into it?
Hi, I'm looking to create a new text file. I am in second term C++ so we're not using the MFC or anything. We have covered opening, reading, closing ifstream and ostream objects from fstream.h , but nothing about how to create a file if one's not there. Is this possible Also - anyone know how to insert an eof into a file through a text editor or something in Windows I am given to understand the eof flag is represented by a ctrl-Z but I can't insert this using textedit. In the mean time I'm using a pipe symbol '|' as my eof flag which is much less elegant. Thank you o wise sages of the code. You asked me in your last comment the following, and I quote directly: " What happens if you use ofstream to open a file for ou ...Show All
Manivannan.D.Sekaran Deadlocks because of indirect calls to SendMessage.
Hi, I have a thread which continuously updates a list view in a dialog. There is a critical section when the user clicks on a menu which performs actions on the list view, so I lock a mutex in the WindowProc and in the thread. The problem is that a deadlock occurs because the thread indirectly calls SendMessage (through functions like SetItemText), and this function doesn't return until the message is processed, but the message can't be processed because the WindowProc function is blocked, waiting for the mutex. I know, I read a lot of forum posts on the Internet, and they all tell the same thing: I most call PostMessage instead of SendMessage. But the thread calls SendMessage _indirectly_, I can't call PostMessage instead. Furthermore, my ...Show All
Bruno Kovačić CaseSensitive Keyboard Hook
Hi, i made a programm. it displays the entered keys in a console window. But all letters are in "caps lock"! How can i prevent that eg. if i enter: aBcDeFg it displays: ABCDEFG [code] __declspec(dllexport) LRESULT CALLBACK KeyEvent (int nCode,WPARAM wParam,LPARAM lParam) { if ((nCode == HC_ACTION) && ((wParam == WM_SYSKEYDOWN) || (wParam == WM_KEYDOWN))) { KBDLLHOOKSTRUCT hooked = *((KBDLLHOOKSTRUCT*)lParam); DWORD dwMsg = 1; dwMsg += hooked.scanCode << 16; dwMsg += hooked.flags << 24; char key[16]; GetKeyNameText(dwMsg,key,15); std::cout << key; } return CallNextHookEx(hKeyHook,nCode,wParam,lParam); } [/code] Simple ...Show All
Rocinante8 Does CAtlHttpClientT support chunked responses (HTTP/1.1)?
Moderator: Please do not delete this post as a duplicate. Delete the one in the Visual C++ Language forum instead. Thanks for the reply, Jamie. I'm quite sure it's ATL 8.0... whatever comes with Visual Studio 2005. I will break on ReadChunkedBody to see what's happening with that. In the meantime, I'm using the WinHttp library and that seems to work quite well. We have other code that is using CAtlHttpClient though so I'd like to use the same client for everything. Dan Hi Dan, CAtlHttpClient::Navigate does indeed handle chunked responses, and should do so automatically based on the HTTP response header containing the "Transfer-Encoding: chunked" value. What version of the AT ...Show All
Jym Disappearing scrollbars...
Hello, I have a problem regarding scrollbars that disappear when trying to display a CMetaFile object. I'm using VC++ 6.0 Enterprise Edition, and here's some code from the situation: Please take in count two facts: First, the working code was already done, I'm just trying to extend it in the way you'll see below. Second, I'm also clumsy regarding VC++. **blush** That's why I badly need your help, folks. CMetaFile mf; CWnd *tele = GetDlgItem(IDC_TELE); // IDC_TELE is a Picture object, defined within a dialog CWindowDC dc(tele); CDC *hereWePaint; hereWePaint = &dc; // ... // Here we load the .wmf file successfully, and store it into mf // ... CRect dim_tele; tele->GetClientRect(&dim_tele); mf.Display(hereWePaint, dim_tele); ...Show All
cka11 Insert binary files into MySQL ??!!
Hello, I've been trying for some time to insert a binary file into MySQL using ODBC connection and VC++ 2005, and can't do it :/. Does anyone can help me or give me any tip I'm really desperate with this ... I've try it in a lot of ways. The first I was using pure C code functions and try to convert the binary data into a String^ (since I need it for the query string to execute). Currently I'm using VC++ functions to read and convert the file to String^ to insert in the query string. I'm using something like this, but it doesn't work :/: FileStream ^fs; BinaryReader ^bin; String^ tmpstr; fs = File::Open("C:\\database.dat",FileMode::Open); tmpstr = gcnew String(""); bin = gcne ...Show All
