Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

sunny_vc

@sunny_vc
About
Posts
100
Topics
50
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • my exe appears in task manager after closing.
    S sunny_vc

    Hi all, I have a dialog based application in MFC using visual studio 2005. After I close the application, in CTestMainFrame::OnClose(), I am doing PostQuitMessage( 0); With this the dialog box closes but my application still exists in Windows task manager. Can you please help is there any other way I can kill my app completely.

    Regards, Sunil.

    C / C++ / MFC csharp c++ visual-studio help

  • using static library for C code in Visual studio 2005
    S sunny_vc

    Hi, One more thing is,it compiles properly for C++ in debug mode. But in Release mode the same unresolved external errors, I am getting for the functions. I have mentioned the project properties in Release mode same as in Debug mode. But still it is unable to link to the functions in the library. Why this behavior.Does it mean, the library is compiled in debug mode? Regards, Sunil.

    Regards, Sunil Kumar

    C / C++ / MFC csharp c++ visual-studio question

  • using static library for C code in Visual studio 2005
    S sunny_vc

    Hi, the good thing is that I have both static and dynamic libraries. But I wanted to use only static, so that I can distribute only an exe. But anyway, now I will have to use the dynamic library. Thanks for the help.

    Regards, Sunil Kumar

    C / C++ / MFC csharp c++ visual-studio question

  • using static library for C code in Visual studio 2005
    S sunny_vc

    Hi Malli, thanks for the reply. So in that case,by using dynamic loading of library using LoadLibrary, we can avoid this even the library is compiled as C++.?

    Regards, Sunil Kumar

    C / C++ / MFC csharp c++ visual-studio question

  • using static library for C code in Visual studio 2005
    S sunny_vc

    Hi, I am working on a simple win32 console based application in C in visual studio2005. My application uses a third party static library. So I have included the path of the library and the library in additional dependencies for linker input. My code compiles and works fine if I compile this code as C++ code. But If I want to compile this as C code, for the same library functions, I am getting unresolved external symbols. Can any one please let me know, if I have to change anything for this library to compile as C code.?

    Regards, Sunil Kumar

    C / C++ / MFC csharp c++ visual-studio question

  • Replacing some bytes in a file in binary mode
    S sunny_vc

    yeah.i've used the same thing.But that is not working.

    Regards, Sunil Kumar

    C / C++ / MFC performance question

  • Replacing some bytes in a file in binary mode
    S sunny_vc

    Hi, I have a file which is in binary mode.(I am using stdio functions fwrie,fread,fseek) I have to read this file in binary mode and needs to replace some of the bytes in this file. It contains around 1000 entries with 2 bytes each. I know the location of bytes which is to be changed, like 100th entry. Is there anyway to change that specific bytes, without copying in to other file. As I have small memory I can not copy into other file and recopy with changed bytes. So on the fly i want to change specific bytes. please tell me if any method is there to do this.?

    Regards, Sunil Kumar

    C / C++ / MFC performance question

  • How to check if any specific folder is empty
    S sunny_vc

    Thanks a lot Michael.This is exactly what I am looking for.

    Regards, Sunil Kumar

    C / C++ / MFC json tutorial question

  • How to check if any specific folder is empty
    S sunny_vc

    Yeah the case can be considered. But the directory is created by my application and the files are also created by my application. My files doesnt contain any extension. I do not understand how I can use FindFirstFile. FindFirstFile is giving me the valid handle.But FindNextFile is always returning 0, even files are present. what is the reason behind it?

    Regards, Sunil Kumar

    C / C++ / MFC json tutorial question

  • How to check if any specific folder is empty
    S sunny_vc

    Hi all, I am working on VC6. I have a folder path which I have to check whether it is empty or not. Is there any API to find folder is empty? Thanks in advance.

    Regards, Sunil Kumar

    C / C++ / MFC json tutorial question

  • Serial port behaviour in XP and windows 2000
    S sunny_vc

    My application is communicating at 115200 baud rate speed with an embedded device.

    Regards, Sunil Kumar

    C / C++ / MFC question

  • Serial port behaviour in XP and windows 2000
    S sunny_vc

    Hi all, I am working on serial port application on VC6 using non overlapped IO. I used the following time out values. ReadIntervalTimeout = 1; ReadTotalTimeoutMultiplier =1; ReadTotalTimeoutConstant =2; In XP operating system for these settings my application is working fine. But when I use these settings in windows 2000, the application does not send and receive properly. In 2000, if I change the settings to ReadIntervalTimeout = 0xffffffff; ReadTotalTimeoutMultiplier =0; ReadTotalTimeoutConstant =0; it works properly.But If I use these values, my application receiving thread shows CPU usage much high. Are the settings for read interval are correct? Please clarify..

    Regards, Sunil Kumar

    C / C++ / MFC question

  • Keeping a thread idle for a while
    S sunny_vc

    Hi all, I have a thread in my application. When the thread is running its eating up the CPU. My thread code is like:

    ThreadProcess(LPVOID)
    {
    while(TRUE)
    {
    if(flag==true) //This thread waits for the flag to be set
    {
    ExecFunc();

     }
    

    }

    }

    If the flag is set then it will execute the function.This flag is set in other function. So I want to keep this thread idle until the flag is set. How can I do it.Please help me.

    Regards, Sunil Kumar

    C / C++ / MFC help question

  • How to store rich edit box contents to a text file
    S sunny_vc

    Hi all, I have a rich edit control in my application(VC6.0)which display some log messages. How can I store the content of it to a text file. Is there any direct method to do it?

    Regards, Sunil Kumar

    C / C++ / MFC question tutorial

  • Compiler error when defining enum for registry
    S sunny_vc

    Thanks mate. (LONG_PTR) works.

    Regards, Sunil Kumar

    C / C++ / MFC csharp visual-studio windows-admin help question

  • Compiler error when defining enum for registry
    S sunny_vc

    Hi, I am using one of the registy class given in CP. The keys are defined in .h file like:

    enum Keys
    {
    classesRoot = HKEY_CLASSES_ROOT,
    currentUser = HKEY_CURRENT_USER,
    localMachine = HKEY_LOCAL_MACHINE,
    currentConfig = HKEY_CURRENT_CONFIG,
    users = HKEY_USERS,
    performanceData = HKEY_PERFORMANCE_DATA,
    dynData = HKEY_DYN_DATA
    };

    When I compile this in VC6.0 it compiles with no errors. But when I compile the same in visual studio 2003 it gives error like:" Constant expression is not intergral" If i cast like: "classesRoot=(int)HKEY_CLASSES_ROOT", it throws warning such as "pointer truncation from HEKY to int". How can I avoid the error.Please suggest.

    Regards, Sunil Kumar

    C / C++ / MFC csharp visual-studio windows-admin help question

  • Copying only a sinlge dialog box from one application to other application
    S sunny_vc

    Hi all, I have two applications in VC6. I have to copy only a single dialog box (not the entire RC file) from one application to other. I know we can copy the RC file , but I dont want the entire RC file. I want to copy only one dialog box from the one RC file and paste in other RC file. Please suggest.

    Regards, Sunil Kumar

    C / C++ / MFC

  • Non Ovelapped Serial I/O
    S sunny_vc

    Hi, I already read the article.But I am trying using Non overlapped I/O. If it is impossible to do using Non overlapped, i will shift to overlapped.

    Regards, Sunil Kumar

    C / C++ / MFC help tutorial question

  • Non Ovelapped Serial I/O
    S sunny_vc

    Even If I have to send data in the same receive thread, I am unable to do as WaitCommEvent never returns. My code block is:

    if (!SetCommMask( pc->hCommn, EV\_RXCHAR))
    {
    	//Error
    }
    for ( ; ; ) 
    {
    if (WaitCommEvent(pc->hCommn, &dwCommEvent, NULL)) 
    {
      
    	do
    	{
    	if (ReadFile(pc->hCommn, &chRead, 1, &dwRead, NULL))
    	  {
    		 // A byte has been read; process it.
    		  pc->CopyRx(chRead);
    	  }
    	  else
    	  {
    		 // An error occurred in the ReadFile call.
    
    		 break;
    	  }
    	}while(dwRead);
    }
    

    else
    // Error in WaitCommEvent.
    break;
    }

    Where can I call my send fucntion in this thread, if I have some data to send. Please suggest.

    Regards, Sunil Kumar

    C / C++ / MFC help tutorial question

  • Non Ovelapped Serial I/O
    S sunny_vc

    yeah, I am unable to open it twice even if I mention the shared attributes. There is no other option for non overlapped I/O, if I have to WriteFile, when my receive thread wait for an event using WaitCommEvent?

    Regards, Sunil Kumar

    C / C++ / MFC help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups