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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
K

Killer3

@Killer3
About
Posts
27
Topics
21
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Does this ATL Code Leak memory?
    K Killer3

    STDMETHODIMP CTryoutATL::ConcatenateString(long count, BSTR *ReturnVal) { // TODO: Add your implementation code here BSTR outputTempString; BSTR outputString = new OLECHAR[30]; BSTR tempString = new OLECHAR[30]; swprintf(tempString,L"The KILLER "); BOOL bFirstTime = TRUE; for(long i =1; i < count ; i++) { BSTR tempString = new OLECHAR[30]; swprintf(tempString,L"This Ilanthendral kills %ld\n",i); outputTempString = new OLECHAR[30*i]; if(!bFirstTime) { wcscpy(outputTempString,outputString); wcscat(outputTempString,tempString); } else wcscpy(outputTempString,tempString); bFirstTime = FALSE; delete [] outputString; delete [] tempString; outputString = outputTempString; } *ReturnVal = outputTempString; return S_OK; }

    for thendral

    ATL / WTL / STL c++ performance question

  • Active Directory Service Intertface ADsGetObject fails with 80004002
    K Killer3

    The following code fails and return "0x80004002" error Invalid Syntax. Can any one provide me direction to solve this problem. Is there any sample VC++ to get list domain in Primary Domain Controller, and to list the users in one domain WCHAR szTest [100]; swprintf(szTest,L"%s","WinNT://development/ilanthendralr,user"); HRESULT hr = CoInitialize(NULL); IADsUser *pUser; hr = ADsGetObject(szTest,IID_IADsUser,(void**)&pUser); if (FAILED(hr)) {return ;} BSTR bstr; hr = pUser->get_FullName(&bstr); printf("User: %S\n", bstr); SysFreeString(bstr); CoUninitialize();

    for thendral

    C / C++ / MFC help c++ windows-admin

  • Active Directory Service Intertface ADsGetObject fails with 80004002
    K Killer3

    The following code fails and return "0x80004002" error Invalid Syntax. Can any one provide me direction to solve this problem. Is there any sample VC++ to get list domain in Primary Domain Controller, and to list the users in one domain WCHAR szTest [100]; swprintf(szTest,L"%s","WinNT://development/ilanthendralr,user"); HRESULT hr = CoInitialize(NULL); IADsUser *pUser; hr = ADsGetObject(szTest,IID_IADsUser,(void**)&pUser); if (FAILED(hr)) {return ;} BSTR bstr; hr = pUser->get_FullName(&bstr); printf("User: %S\n", bstr); SysFreeString(bstr); CoUninitialize();

    for thendral

    COM help c++ windows-admin

  • CLISTBOX Owner Drawn ListBox , DrawText does not return correct height.
    K Killer3

    CODE SNIPNET m_nFormat= DT_NOPREFIX | DT_LEFT | DT_WORDBREAK | DT_EXPANDTABS | DT_EDITCONTROL; CClientDC dc(pWnd); UINT nFormat = m_nFormat | DT_CALCRECT; dc.DrawText(strText, cellRect, nFormat); int nTotalPadding = (2 * m_nTextPadding); lpItemStruct->itemWidth = cellRect.Width() + nTotalPadding; lpItemStruct->itemHeight = cellRect.Height() + nTotalPadding; The height returned by the CDC::DrawText is not consitent, it behaves different for string of same length example.. 1) String full capital letters of length say 160 it returns ==> 81 2) String full capital letters of length say 160 it returns ==> 81 3) String full small letters of length say 160 it returns ==> 100 Please help on this

    for thendral

    C / C++ / MFC help tutorial

  • FOLDER ACCESS PERMISSION
    K Killer3

    Hi all , Please help me out to programmaticaly find whether we have Rights to "CREATE & MODIFY IN a specified folder" in vc++. INPUT : NAME OF THE Folder OUTPUT : Whether it is possible for logged user to create a file in folder

    for thendral

    C / C++ / MFC c++ help

  • Memory of the COM objects get allocated?
    K Killer3

    Hi Question 1: When we create an COM object in a Process where does the memory of the COM objects get allocated? Question 2: Does the memory allocated to the COM object contributed to increase in Virtual memory of the process where it is instantiated.? Question 3: What is the relation between virtual memory of a process and private bytes of the process? for Ilanthendral(KillerInstincts)

    for thendral

    ATL / WTL / STL question com performance

  • Memory Allocation of COM Objects
    K Killer3

    Hi Question 1: When we create an COM object in a Process where does the memory of the COM objects get allocation? Question 2: Does the memory allocated to the COM object contributed to increase in Virtual memory of the process where it is instantiated.? Question 3: What is the relation between virtual memory of a process and private bytes of the process?

    for Ilanthendral**(KillerInstincts)**

    COM question com performance

  • An ISSUE MSMQ Processing
    K Killer3

    "MQ_ERROR_OPERATION_CANCELLED" this error is being thrown my our application. Application comprises two threads each having a their own handle to the queue. We are using Synchronous Call to read,open message from the Queue. Thanks

    for thendral

    C / C++ / MFC help data-structures

  • _Begin Thread c++Query
    K Killer3

    _beginthread(void( __cdecl *start_address )( void * ),unsigned stack_size, void *arglist ); void * arglist ==> can this point to a list of arguments. Since the thread function can have only one parameter of void * how can i achieve the requirement is to pass set of initialisation to the thread function. Any body help me ? for thendral

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

  • VERTICAL SCROLL is visible or available
    K Killer3

    have the scroll property checked for both vertical and horizontal scrollbar. scenario 1: 1) you have Clist box 2) Add few entry to listbox till the vertical scroll bar appears 3) is there any way to find at this point that scrollbar has appeared. so that i may do some action based on that. Query : Any point of time given a LISBOX is it possible to find where VERTICAL SCROLL is visible or available for thendral

    C / C++ / MFC database

  • DETERMINE VERTICAL SCROLLBAR PRESENCE IN LISTBOX
    K Killer3

    HI NAVEEN.., i have the scroll property checked for both vertical and horizontal scrollbar. scenario 1: 1) you have Clist box 2) Add few entry to listbox till the vertical scroll bar appears 3) is there any way to find at this point that scrollbar has appeared. so that i may do some action based on that. Query : Any point of time given a LISBOX is it possible to find where VERTICAL SCROLL is visible or available . for thendral

    C / C++ / MFC c++ question learning

  • DETERMINE VERTICAL SCROLLBAR PRESENCE IN LISTBOX
    K Killer3

    REQURIEMENT : DETERMINE VERTICAL SCROLLBAR PRESENCE IN LISTBOX. The ListBox has both vertical scrollbar and horizontal scrollbar checked in the resource. When we add string to ListBox ,after addding the number of items,the vertical scroll bar appears in the listcontrol. Is there any way to check whether the vertical scrollbar is available or not? CLISTBOX in vc++ for thendral -- modified at 5:33 Friday 12th May, 2006

    C / C++ / MFC c++ question learning

  • IS IT POSSIBLE TO HANDLE MOUSE SCROLL EVENT
    K Killer3

    IS IT POSSIBLE TO HANDLE MOUSE SCROLL EVENT when the focus is on the LISTBOX. When ListBox has only the Horizontal scrollbar,the MOUSE SCROLL Event is by default linked to the HORZIONTAL SCROLL movement. Is there any way to HANDLE this behaviour? Is there any way to STOP this behaviour? Can any one clarify? UNABLE TO HANDLE WM_MOUSEWHEEL WHEN THE FOCUS is on the LISTBOX. for thendral

    C / C++ / MFC question

  • Handling Mouse Scroll on ListBox
    K Killer3

    Unable to capture the mouse wheel event if the focus is on the LISTBOX. CAN u please help me out for thendral

    C / C++ / MFC question

  • Handling Mouse Scroll on ListBox
    K Killer3

    Requirement: IS IT POSSIBLE TO HANDLE MOUSE SCROLL EVENT when the focus is on the LISTBOX. When ListBox has only the Horizontal scrollbar,the MOUSE SCROLL Event is by default linked to the HORZIONTAL SCROLL movement. Is there any way to HANDLE this behaviour? Is there any way to STOP this behaviour? Can any one clarify? Thanks for thendral

    C / C++ / MFC question

  • ACCESSING METHOD EXPORT in CLASS in DLL
    K Killer3

    The above class is export in a dll . So should i add new function to the dll ? Can i have a sample code that achieves it? class __declspec(dllexport) MyClass { public: static char* LSGDecrypt(const char* key,const char* hex); static char* LSGEncrypt(const char* key,const char* source); } Iam about access a static function So is that required to instantiate the class object. HINSTANCE hDLL; // Handle to DLL LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer char* key = new char [50]; key ="KEYVAULE"; char* strPlain = new char [50]; strPlain="password"; char* strResult = new char [50]; DWORD dwrd =NULL; hDLL = LoadLibrary("Mydll.dll"); if (hDLL != NULL) { lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL,"LSGEncrypt"); if (lpfnDllFunc1 ==NULL) // Fails here? so DLL is freed up? { FreeLibrary(hDLL); } else strResult = lpfnDllFunc1("killer" ,"strikes HERE"); } for thendral

    C / C++ / MFC question

  • ACCESSING METHOD EXPORT in CLASS in DLL
    K Killer3

    Can i have a sample code that achieves it? class __declspec(dllexport) MyClass { public: static char* LSGDecrypt(const char* key,const char* hex); static char* LSGEncrypt(const char* key,const char* source); } The above class is export in a dll . So should i add new function to the dll ? Iam about access a static function So is that required to instantiate the class object. HINSTANCE hDLL; // Handle to DLL LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer char* key = new char [50]; key ="KEYVAULE"; char* strPlain = new char [50]; strPlain="password"; char* strResult = new char [50]; DWORD dwrd =NULL; hDLL = LoadLibrary("Mydll.dll"); if (hDLL != NULL) { lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL,"LSGEncrypt"); if (lpfnDllFunc1 ==NULL) // Fails here? so DLL is freed up? { FreeLibrary(hDLL); } else strResult = lpfnDllFunc1("killer" ,"strikes HERE"); } for thendral

    C / C++ / MFC question

  • How do i dynamically acces method export in CLASS
    K Killer3

    Iam not in control of the situation. Can i have a sample code that achieves it? class __declspec(dllexport) MyClass { public: static char* LSGDecrypt(const char* key,const char* hex); static char* LSGEncrypt(const char* key,const char* source); } The above class is export in a dll . So should i add new function to the dll ? Iam about access a static function So is that required to instantiate the class object. HINSTANCE hDLL; // Handle to DLL LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer char* key = new char [50]; key ="KEYVAULE"; char* strPlain = new char [50]; strPlain="password"; char* strResult = new char [50]; DWORD dwrd =NULL; hDLL = LoadLibrary("Mydll.dll"); if (hDLL != NULL) { lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL,"LSGEncrypt"); if (lpfnDllFunc1 ==NULL) // Fails here? so DLL is freed up? { FreeLibrary(hDLL); } else strResult = lpfnDllFunc1("killer" ,"strikes HERE"); } Thanks for thendral

    C / C++ / MFC question help

  • How do i dynamically acces method export in CLASS
    K Killer3

    Hi naveen ! can u advise what exactly i need to do ? Use this API to get the address of a function that returns an instance of the class that you wish to access dynamically. For eg: The function will be something like this... void* FUNC_EXPORT CreateInstance() { return static_cast< void*> (new SomeClass); } Use GetProcAddress to get the address of this function for thendral

    C / C++ / MFC question help

  • How do i dynamically acces method export in CLASS
    K Killer3

    #ifdef EXPCLASS_EXPORTS #define EXPCLASS_API __declspec(dllexport) #else #define EXPCLASS_API __declspec(dllimport) #endif // This class is exported from the EXPCLASS.dll class EXPCLASS_API CEXPCLASS { public: CEXPCLASS(void); char * CEXPMethod(char * plaintext , char * key); // TODO: add your methods here. }; How do i dynamically acces method export in CLASS? CODE USED TO ACCESS METHOD EXPORT IN CLASS hDLL = LoadLibrary("EXPCLASS.dll"); if (hDLL != NULL) { lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL,"CEXPMethod"); if (lpfnDllFunc1 ==NULL) { // handle the error FreeLibrary(hDLL); } else { strResult = lpfnDllFunc1("killer" ,"strikes HERE"); } } for thendral -- modified at 6:54 Thursday 20th April, 2006

    C / C++ / MFC question help
  • Login

  • Don't have an account? Register

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