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
V

V K 2

@V K 2
About
Posts
170
Topics
98
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • copying AAComBSTR to BYTE
    V V K 2

    Can anybody help me in copying AAComBSTR to BYTE. Is there any API available which does this copy. Your help is appreciated.

    ATL / WTL / STL json help

  • ProcessShellCommand () crashes after migrating an application which was originally written in VC 6.0 to VS2010
    V V K 2

    It crashes at EnterCriticalSection in below function of C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\afxcrit.cpp void AFXAPI AfxLockGlobals(int nLockType) { ---- ---- // lock specific resource EnterCriticalSection(&_afxResourceLock[nLockType]); ----- }

    C / C++ / MFC help c++ performance

  • ProcessShellCommand () crashes after migrating an application which was originally written in VC 6.0 to VS2010
    V V K 2

    CCommandLineInfo cmdInfo; ParseCommandLine( cmdInfo ); // Dispatch commands specified on the command line if( !ProcessShellCommand( cmdInfo ) ) return FALSE;

    C / C++ / MFC help c++ performance

  • ProcessShellCommand () crashes after migrating an application which was originally written in VC 6.0 to VS2010
    V V K 2

    We have migrated our application which was written in VC 6.0 to VS2010. The application crashes on launching it. The crash occurs at ProcessShellCommand( ). On debugging got this error "Unhandled exception at 0x7575d36f in MyApp.exe: Microsoft c++ exception CInvalidArgException at memory location 0x0012fb98" What could be the problem and possible fix for this. Thanks in Advance.

    C / C++ / MFC help c++ performance

  • Issue with CreateControl after migration a workspace which was in VC6 to VS2010
    V V K 2

    We have migrated our workspace from VC6.0 to VS2010. There is a CreateControl api which is returning 0 after converting to VS2010. Before conversion this was working fine. What could be the reason for failure.

    C / C++ / MFC json help workspace

  • IsUserAdmin returns false when UAC is enabaled in VS2010
    V V K 2

    The following piece of code was working fine in VC++6.0 . When UAC was enabled/disabled , for an administrative user the IsUserAdmin was returning true. We are migrating VC++6.0 to VS2010. After this when UAC is enabled IsUserAdmin is returning false and when UAC is disabled IsUserAdmin is returning true. Why is this failing in VS2010 when UAC is enabled and what could be fix for this. BOOL IsUserAdmin(VOID) /*++ Routine Description: This routine returns TRUE if the caller's process is a member of the Administrators local group. Caller is NOT expected to be impersonating anyone and is expected to be able to open its own process and process token. Arguments: None. Return Value: TRUE - Caller has Administrators local group. FALSE - Caller does not have Administrators local group. -- */ { BOOL b; SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY; PSID AdministratorsGroup; b = AllocateAndInitializeSid( &NtAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &AdministratorsGroup); if(b) { if (!CheckTokenMembership( NULL, AdministratorsGroup, &b)) { b = FALSE; } FreeSid(AdministratorsGroup); } return(b); } Thanks in advance

    C / C++ / MFC c++ security help

  • LoadLibraryW(dllpath) fails
    V V K 2

    The exact path is LoadLibraryW("C:\\Program Files\\MyApp\\");

    C# csharp

  • LoadLibraryW(dllpath) fails
    V V K 2

    The dll is physically existing in the desired path. But still LoadLibraryW( ) fails.

    C# csharp

  • LoadLibraryW(dllpath) fails
    V V K 2

    We are calling LoadLibary in C#. For this we have included the below code in the C# file. [DllImport("Kernel32.dll")] internal static extern IntPtr LoadLibraryW([MarshalAs(UnmanagedType.LPWStr)] String lpMdoule); We have multiple LoadLibaryW( ) calls. All of them are passing , except one. We verified the GetLastError( ). It returns 126. But the dll is physically existing in the correct path. What could be the reason for dll failure.

    C# csharp

  • LoadLibraryW("C:\abc.dll") fails
    V V K 2

    The dll's which this dll is dependent are available in the appropriate locations. Also tried verifying them in dependencyWalker. There are no dependency erros seen in it. But still the LoadLibaryW call is failing.

    C / C++ / MFC csharp

  • LoadLibraryW("C:\abc.dll") fails
    V V K 2

    We are calling LoadLibary in C#. For this we have included the below code in the C# file. [DllImport("Kernel32.dll")] internal static extern IntPtr LoadLibraryW([MarshalAs(UnmanagedType.LPWStr)] String lpMdoule); We have multiple LoadLibaryW( ) calls. All of them are passing , except one. We verified the GetLastError( ). It returns 126. But the dll is physically existing in the correct path. What could be the reason for dll failure.

    C / C++ / MFC csharp

  • Use single bool and bit flags for other bools.
    V V K 2

    Hi, I have 10 bool variables in a class. Instead of creating 10 bools, how to create a single bool and bit flags for remaining 9 bool variables inorder to efficiently use memory. Can I have a code snippet in C# for this.. Thanks in Advance.

    C# csharp performance tutorial

  • Socket connection is getting closed when terminal services is enabled in Win2008R2 OS
    V V K 2

    Hi, My machine has Win2008R2 OS and terminal services enabled. I am trying to open a socket. But immediately after connecting to the socket the connection is getting closed. Is ther anything related to terminal services that is causing this issue When I disabled the terminal services.. everything is working fine. Thanks

    C / C++ / MFC help

  • Directory creation under a restricted folder.
    V V K 2

    My system has a directory C:\AAAA. Where 'AAAA' has security permissions set. ie., only read operations can be performed and no write operations. My application tries to create a directory under 'AAAA'. i.e, C:\AAAA\BBBB. I am trying to handle an exception to avoid a crash - try { Directory.CreateDirectory("C:\\AAAA\\BBBB"); } catch(Exception ex) { } But I am observing that the catch handler is never invoked. My application is trying to create the directory, It is unable to create and it goes to the next statement after the catch block. What would be the code to check whether a directory can be created under AAAA or not.

    C# security

  • how to get Window name from window handle in win32.
    V V K 2

    how to get Window name from window handle in win32.

    C / C++ / MFC tutorial

  • Get an exception while opening a file
    V V K 2

    It gives me the below value for ex.GetErrorMessage ex ={Cause=0 OS Error = m_IOsError}

    C / C++ / MFC

  • Get an exception while opening a file
    V V K 2

    I have tried putting only one of the CFile::shareExclusive|CFile::shareDenyNone , still it crashes.

    C / C++ / MFC

  • Get an exception while opening a file
    V V K 2

    Hi , I am using the below code for retrieving the length of a file. I have list of file names in a CStringArray object. bool Search(CString szBinName,CString szBinSize,CStringArray& arr) { int nSize = arr.GetSize(); CString str,temp; bool bRet; bRet = false; for(int i=0;i

    C / C++ / MFC

  • Code snippet for searching a file in directory (directory can have subdirectories in it)
    V V K 2

    Hi, I need to search for a file in a specific directory. This directory would also have subdirectories in it. Can I have a API / code snippet for this. Thanks in advance.

    C / C++ / MFC algorithms json

  • Code snippet for reading from a .xlsx file in VC++
    V V K 2

    Hi, I have a excel file with two columns. Namely Binary Name, Binary Size. I need to read each binary name,size from the excel file and compare that with the Binary name and size in the corresponding installation folder. Can I have a code snippet for reading the Binary Name, Binary Size from the .xlsx file Thanks in advance.

    C / C++ / MFC c++
  • Login

  • Don't have an account? Register

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