Search Results

Search found 686 results on 28 pages for 'vc'.

Page 8/28 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • LockWorkStation - Compilation error - identifier not found

    - by Microkernel
    Hi All, I am writing an application in which I got to lock the computer screen (OS is Windows). My Application is in C++. For this purpose I used the LockWorkStation() API defined on msdn, http://msdn.microsoft.com/en-us/library/aa376875%28VS.85%29.aspx I have included windows.h as told but still I am getting compilation error: .\source.cpp(5) : error C3861: 'LockWorkStation': identifier not found here is a sample code thats giving error. #include <Windows.h> int main() { LockWorkStation(); return 0; } Please tell me what I am missing here :( I am using MS-Visual studio 2005. Regards.

    Read the article

  • what is the reason of Invalid Address specified to RtlFreeHeap

    - by carl
    the develop environment is vs2008, the language is c++, when I release the problem,at beginning it run with out problem but after several minutes it stop and show error like that : HEAP[guessModel.exe]: Invalid Address specified to RtlFreeHeap( 003E0000, 7D7C737B ). who can tell me the reason of the error. thank you very much.

    Read the article

  • winwindows programming problem

    - by Jayjitraj
    I want to write programming which will connect to a network for some second then disconnect from it and it should be that much fast that other application should not fill it is disconnected so on which layer should i program i know how to disconnect and connect to the network so any suggestion ...... thanks in advance....

    Read the article

  • Microsoft VC++ 2005 SP1 and 2008 SP1 Redistributable Package

    - by ewlung
    Dear developers, I have an application that requires Microsoft VC++ 2005 (SP1) Redistributable Package. I know that I can just download it and install it. The problem is, in our server, there is Microsoft VC++ 2008 (SP1) Redistributable Package already installed. Now, do I still need to install the 2005 (SP1) version? Or the 2008 (SP1) is "backward compatible" with 2005 (SP1)? Thank you.

    Read the article

  • error C2065: 'IOCTL_NDISUIO_OPEN_DEVICE' : undeclared identifier

    - by Jassi
    Hello, I am facing "error C2065: 'IOCTL_NDISUIO_OPEN_DEVICE' : undeclared identifier error in beneath code. Where i am wrong, please help me out. #include "Ntddndis.h" #include "Nuiouser.h" HRESULT OpenInterfaceHandle( LPWSTR adapterGuid, HANDLE *pHandle) { WCHAR deviceGuid[128]; HANDLE intfHandle; HRESULT hr = S_OK; DWORD dwDummy; DWORD dwErr = ERROR_SUCCESS; wcscpy( deviceGuid, L"\\DEVICE\\" ); wcscat( deviceGuid, adapterGuid ); intfHandle = CreateFileA( "\\\\.\\\\Ndisuio", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, INVALID_HANDLE_VALUE); if ( intfHandle == INVALID_HANDLE_VALUE ) { hr = E_FAIL; TraceMsg(L"CreateFile failed\n"); } if (hr = S_OK) TraceMsg(L"CreateFile successful\n"); if ( hr == S_OK ) { if ( !DeviceIoControl( intfHandle, IOCTL_NDISUIO_OPEN_DEVICE, (LPVOID)deviceGuid, wcslen(deviceGuid)*sizeof(WCHAR), NULL, 0, &dwDummy, NULL) ) { dwErr = GetLastError(); hr = E_FAIL; TraceMsg(L"Open Device failed with Error %d\n", dwErr); } else { *pHandle = intfHandle; hr = S_OK; TraceMsg(L"Open Device successful\n"); } } return hr; } thanx in advance,

    Read the article

  • I need a simple Example of JNA which can map char * of c dll.

    - by Vikas Sharma
    I have one dll of cpp and i need to call its function which returns char*. Im using String in native Declaration but getting out put like ???? or some crap thing. I just want to knw that do i have to decode the String.i have already set my system property like System.setProperty("jna.encoding","UTF-8"); Im in big mess. Hope to get Some Positive replies from u guys. Thanks in Advance.. Cheers...!

    Read the article

  • Stack allocation fails and heap allocation succeeds!! Is it possible??

    - by Prabhu
    Hello All, I have the following piece of snippet Class Sample { Obj_Class1 o1; Obj_Class2 o2;}; But the size of Obj_Class1 and Obj_Class2 is huge so that the compiler shows a warning "Consider moving some space to heap". I was asked to replace Obj_Class1 o1 with Obj_Class1* o1 = new Obj_Class1(); But I feel that there is no use of making this change as heap allocation will also fail if stack allocation fails. Am I correct? Or does it make sense to make this change ( other than suppressing the compiler warning ).

    Read the article

  • Serial port data availability problem

    - by harry
    Hello Evryone. I am new to this type of programming..i just want some help...regarding what to do when u need to extract the data from the serial port..and how to check that tha data is available in the serial port..so that no data loss is there....

    Read the article

  • How do I redirect output from the Visual Studio debugger?

    - by jeatsy
    In Visual Studio 2008, I can specify a message to be printed when a breakpoint is hit (by right-clicking the breakpoint and choosing 'When Hit...'). When the program is run, these messages appear in the Output Window. I would like to know, is there any way to redirect them to a file? Specifying file.txt as a command argument to the program does not work: this redirects the program's output, but not the debugger's. (FWIW the behaviour I wish to achieve is to get the debugger to repeatedly print a variable's value to a file, rather than peppering my code with printf/cout statements.)

    Read the article

  • [MFC] Combining 2 memory DCs ?

    - by OverTheEdge
    I'm writing a control where there's a lot of custom drawing going through. Because of this I need to trim down the amount of "screen writes" that go about. Currently there is only one memory DC that is used to write to screen so as to avoid flicker when the control is redrawn. I want to know if it is a possiblity to use 2 or more memory DCs to write updates independently and then bitblt them to screen. This way the need to render non-changed parts of the screen is minimized. thanx in advacne, the_Saint

    Read the article

  • Template Matching 2 ROI in a single video capture in real time

    - by YS
    Hi, I am working on a project to perform template matching on a video captured via my webcam. I am able to create 2 template from the webcam capture, but I am unable to perform template matching for both. The program can run only with either template matching, but not both. My program sequence is: Capture from webcam get template 1 get template 2 perform template 1 matching with webcam capture then perform template 2 matching with webcam capture if fail, stop. Can any expert advice me on this?

    Read the article

  • Applications result affected by another running application.

    - by Jamie Keeling
    This is a follow on from my previous question although this is about something else. I've been having a problem where for some reason my message that I pass from one process to another only displays the first letter, in this case "M". My application is based on a MSDN sample so to make sure I hadn't missed something I create a separate solution, added the MSDN sample (without any changes for my needs) and unsurprisingly it works fine. Now for the weird bit, when I run the MSDN sample running (as in debugging) and have my own application running, the text prints out fine without any problems. The second I run my on its own without the original MSDN sample being open, and it fails to work and only shows an "M". I've looked in the debugger and don't seem to notice anything suspicious (it's a slightly dated picture, I've fixed the data type inconsistency). Can anyone provide a solution for this? I've never encountered anything like this before. To look at my source code it's easier to just look at the link I posted at the top of the question, there's no point in me posting it twice. Thank you for any help.

    Read the article

  • UpdateAllWindows() from within a worker thread?

    - by Harvey
    I have a worker thread in a class that is owned by a ChildView. (I intend to move this to the Doc eventually.) When the worker thread completes a task I want all the views to be updated. How can I make a call to tell the Doc to issue an UpdateAllViews()? Or is there a better approach? Thank you.

    Read the article

  • Using MPI under VC++ MFC project?

    - by Mike
    Does any body know how can I use MS_MPI in my VC++ MFC project? I already have a big MFC project and I only want to use parallel processing in a part of it with MPI. (I know how to use MPI in a separate code, but I don't know how to integrate it with my VC++ MFC project)

    Read the article

  • Crash generated during destruction of hash_map

    - by Alien01
    I am using hash_map in application as typedef hash_map<DWORD,CComPtr<IInterfaceXX>> MapDword2Interface; In main application I am using static instance of this map static MapDword2Interface m_mapDword2Interface; I have got one crash dump from one of the client machines which point to the crash in clearing this map I opened that crash dump and here is assembly during debugging > call std::list<std::pair<unsigned long const ,ATL::CComPtr<IInterfaceXX> >,std::allocator<std::pair<unsigned long const ,ATL::CComPtr<IInterfaceXX> > > >::clear > mov eax,dword ptr [CMainApp::m_mapDword2Interface+8 (49XXXXX)] Here is code where crash dump is pointing. Below code is from stl:list file void clear() { // erase all #if _HAS_ITERATOR_DEBUGGING this->_Orphan_ptr(*this, 0); #endif /* _HAS_ITERATOR_DEBUGGING */ _Nodeptr _Pnext; _Nodeptr _Pnode = _Nextnode(_Myhead); _Nextnode(_Myhead) = _Myhead; _Prevnode(_Myhead) = _Myhead; _Mysize = 0; for (; _Pnode != _Myhead; _Pnode = _Pnext) { // delete an element _Pnext = _Nextnode(_Pnode); this->_Alnod.destroy(_Pnode); this->_Alnod.deallocate(_Pnode, 1); } } Crash is pointing to the this->_Alnod.destroy(_Pnode); statement in above code. I am not able to guess it, what could be reason. Any ideas??? How can I make sure, even is there is something wrong with the map , it should not crash?

    Read the article

  • How to change the text color in a disabled edit box using MFC?

    - by anand.arumug
    Hello all, I have a dialog in which the edit box is disabled but the text should be displayed in red instead of the default grey. I tried the following: void CMyEdit::OnEnable(BOOL bEnable) { CEdit::OnEnable(bEnable); if (bEnable) { m_BackGroundColor = kRGBWhite; } else { m_BackGroundColor = kRGBDefaultGray; } m_TextColor = kRGBRed; m_BackgroundBrush.DeleteObject(); m_BackgroundBrush.CreateSolidBrush(m_BackGroundColor); Invalidate(); } But its still displaying the text in grey only. But if I remove the base class call CEdit::OnEnable(bEnable); then new text color takes effect. Can anyone explain whats wrong in the code? Thanks for your time. cheers...

    Read the article

  • Event trigger print using VC++

    - by santhosh kumar
    I have requirement to print log data continuously whenever an event trigger (Without showing print dialog, using default printer). Event may occur twice a second or minit or hour. Also i don`t bother about printer status. example out of paper, communication problem. Printer should not leave empty page. Example event 1 have 4 lines of data to print. While printing event 2, printer should print continuously instead of fetching next paper. My development environment VC++ and MFC.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >