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
F

Frank K

@Frank K
About
Posts
53
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • creating error or loading DLL error?
    F Frank K

    Hi, I think GetProcAddress can't resolve the function address at your DLL. Can you check your DLL if the function is exported from your DLL (e.g. with Depency Walker from VC, I'm not sure that it is included at the express version). Is your DLL-func exported like extern "C" __declspec(dllexport) int functeste(int i){....} Take also a look to this article and my comment. http://www.codeproject.com/KB/DLL/rsLoadtimeDLL.aspx?fid=29819&select=1269812&tid=1074998[^] HTH Frank

    modified on Friday, February 20, 2009 2:06 AM

    C / C++ / MFC help c++ debugging question

  • Tree Control
    F Frank K

    Hi,

    SendMessage(hWndTreeView, TVM_SELECTITEM, ActionFlag, hTreeItem);
    

    TVM_.... -> TreeViewMessage HTH

    C / C++ / MFC data-structures tutorial question

  • How to check bits in a byte.
    F Frank K

    Hi, count the bits: 8-7-6-5-4-3-2-1

    if(myByte & 0x4)
    {
      //the third bit is '1'
    }
    else
    {
      //the third bit is '0'
    }
    

    HTH

    C / C++ / MFC question c++ tutorial

  • Problem with RegOpenKeyEx() in Vista
    F Frank K

    Hi, "KEY_WRITE" -> have you administration rights? (because HKLM) What is the return value of GetLastError()? Frank

    C / C++ / MFC json help

  • How i can create file..
    F Frank K

    Hi, CreateFile( "FullFilePath", GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); e.g. with FullFilePath = "C:\\MyDir\\MyApp\\debug\\filename.ini" or get the directory with: GetCurrentDirectory(...) or otherwise with: GetModuleFileName(...) + _splitpath(...) HTH Frank -- modified at 7:43 Monday 4th December, 2006

    C / C++ / MFC debugging question

  • Exporting in a DLL
    F Frank K

    Hi, > Lets say you have a class in your DLL. And this class has a couple of functions that will be exported. Is it nessacery to export the class? To export a class from a dll is only possible from MFC-Class-DLL to MFC-Application. (or Microsoft Specific) To export a class isn't C++ standard. HTH Frank

    C / C++ / MFC question tools

  • How Can i Call a Function Providing its name as a string
    F Frank K

    Hi, Function as a string?? Why? ... but ... You can get the address of a function with FARPROC GetProcAddress(HMODULE hModule, LPCSTR lpProcName); You need the module handle and the name of the function. Example for the function GetMenu from user32.dll typedef HMENU (WINAPI *GETMENU) (HWND); GETMENU FuncGetMenu; HMODULE hUser32Dll; _hUser32Dll = ::LoadLibrary("user32.dll"); if(NULL != hUser32Dll) { FuncGetMenu = (GETMENU)::GetProcAddress(hUser32Dll, "GetMenu"); } if(NULL != FuncGetMenu) { FuncGetMenu(WindowHandle); //HMENU GetMenu(HWND hWnd); } This is an example for dynamic load a dll. --> You need more than only the function name! You also need the function declaration. HTH Frank

    C / C++ / MFC c++ question

  • Winsock TCP Client disconnect
    F Frank K

    Hi, the value from SOCKET_ERROR is -1 if you unplug the network recv will be return 0 Change your code to do { n=recv(client,buff,MAX_BUFF_SIZE,0); if(1 > n) { break; } }while(); HTH Frank

    C / C++ / MFC sysadmin question com tools help

  • Debugging NULL call CTDs
    F Frank K

    Hi, look at this (Finding crash information using the MAP file): http://www.codeproject.com/debug/mapfile.asp[^] HTH Frank

    C / C++ / MFC help question debugging c++ data-structures

  • Increase the window message priority
    F Frank K

    Hi, I think you don't need an increased priority, you only need a DLL without a deadlock! Or if you havn't a deadlock, you need multithreading. Your problem is, that your application-main-thread can't process the message-loop, if he is running (and blocking) at the DLL. HTH Frank

    C / C++ / MFC question help

  • error LNK2001: unresolved external symbol _strnicmp
    F Frank K

    Hi, you need only one of this libraries. Each of this libraries has the "same" functions, but for other threading and linking! Include path: Version 1: (for the studio) Tools->Options Dialog-Tab: Directories Choose: Library Files and add the directory from the lib Version 2: (only the project) Use Project-->Settings-->Link-->Object\Library module edit box. the correct path for you = ??? -> search for one of this files -> possible results: c:\program files\Microsoft Visual Studio\VC98\Lib c:\program files\Microsoft SDK\lib If you found more than one locations, use the newest versions. (e.g. SDK -> include order) HTH Frank

    C / C++ / MFC help question

  • LINK : fatal error LNK1104: cannot open file 'Ws2_32.lib'
    F Frank K

    Hi But winsock.lib (winsock version 1.0) is the old version. The newer version is ws2_32.lib (winsock version 2.0) Frank

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

  • Handling WM_INITMENUPOPUP
    F Frank K

    Hi, only a (untested) proposal. Have you tried WM_MENUSELECT? This message is (possible) send before WM_INITMENUPOPUP. -> catch the selection before the popupmenu is created HTH Frank

    C / C++ / MFC question

  • error LNK2001: unresolved external symbol _strnicmp
    F Frank K

    Hi, good question ... a) libc.lib -> single threaded, static link b) libcmt.lib -> multithreaded, static link c) msvcrt.lib -> multithreaded, dynamic link and for debugging versions libcd.lib libcmtd.lib msvcrtd.lib HTH Frank

    C / C++ / MFC help question

  • Need help on socket progrmming
    F Frank K

    Hi, why would you connect to another system at function OnAccept()? CMySock::OnAccept() { CMyClientSock *NewClientSock = new CMyClientSock(); Accept( NewClientSock, NULL, NULL ); //--> now the NewClientSock object is connected to the new incoming connection, you don't need construct / connect any object. } HTH Frank

    C / C++ / MFC help tutorial

  • LINK : fatal error LNK1104: cannot open file 'Ws2_32.lib'
    F Frank K

    Hi, look at Tools->Options Dialog-Tab: Directories Choose: Library Files and add the directory from the lib HTH Frank

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

  • RegOpenKeyEx Question
    F Frank K

    Possible another way .. if(ERROR_SUCCESS != RegOpenKeyEx(...)) { //Get the error code DWORD LastError = GetLastError(); //Get the error code as text (example) TCHAR szBuf[80]; LPVOID lpMsgBuf; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, dw, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL ); sprintf(szBuf, "Error %d: %s", LastError, lpMsgBuf); MessageBox(NULL, szBuf, "Error", MB_OK); LocalFree(lpMsgBuf); } HTH Frank

    C / C++ / MFC question windows-admin

  • MessageBox, Help needed
    F Frank K

    Hi, only a try ::MessageBox(NULL, "Your text", "Error", MB_OK | MB_ICONERROR| ... ); HTH Frank

    C / C++ / MFC help

  • How does CListCtrl notify its parent window when a cell content has changed?
    F Frank K

    Hi, the CListCtrl is in a dialog? Have you create a dialog member function for this CListCtrl (e.g. OnItemchangedMyCListCtrl)? (This is OK at my projects) Or have you the dialog member function "PreTranslateMessage" and look for the LVN_ITEMCHANGED message? Greetings Frank

    C / C++ / MFC question

  • retrieving html from a website
    F Frank K

    Hi, I understand, you have an application and want to get the HTML-sourcecode and parse them? Take a look at this: http://www.codeproject.com/miscctrl/simplebrowserformfc.asp I think this is off-topic, but ... To get a website and all links from this site use "Mozilla-FireFox" and the AddOn "downThemAll". Now you need only a "right-mouse-click" and change some options from "downThemAll" and the FireFox will save all website to your harddisk. Mozilla downThemAll

    C / C++ / MFC html 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