CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: AdaraCD

Page 1 of 14 1 2 3 4

Search: Search took 0.63 seconds.

  1. Thread: NetShareAdd

    by AdaraCD
    Replies
    3
    Views
    1,391

    Re: NetShareAdd

    Only a members of the administrators group can call NetShareAdd
  2. Re: Terminating a Process using API - How To ?

    The calling process need SE_DEBUG_NAME Privilege enabled to open process for termination
  3. Re: Windows Service, Create Process and Windows creation

    You need to add the user account to the window station and desktop ACL

    here is a sample
  4. Replies
    10
    Views
    12,461

    Re: ConvertSidToStringSid

    try this:




    LPSTR lpSid = NULL;

    if (pConvertSidToStringSid)
    {
    /// call the fucntion with your parameter
  5. Replies
    6
    Views
    7,591

    Re: Opening a directory with NtCreateFile

    BTW
    You can also use CreateFile() with FILE_FLAG_BACKUP_SEMANTICS



    hDir = CreateFile(_T("C:\\windows"),
    GENERIC_WRITE|GENERIC_READ,
    0,
    ...
  6. Replies
    6
    Views
    7,591

    Re: Opening a directory with NtCreateFile

    Try to convert the path from "c:\windows\" to "\??\C:\windows\" with RtlDosPathNameToNtPathName()
  7. Replies
    3
    Views
    1,216

    Re: unlock users account

    NetUserSetInfo
  8. Replies
    2
    Views
    1,470

    Re: .dmp no symbol found with . pdb ?

    try Debugging Tools and Symbols: Getting Started
  9. Re: API to get the processes list of a remote machine in the same network

    WTSEnumerateProcesses or PdhEnumObjectItems
    check this thread.
  10. Replies
    5
    Views
    1,668

    Re: Service, User and Interact with desktop

    If any of these functions fails call for GetLastError(), if the error is 5 (Access denied) you will need to add permissions to the window station and desktop before SwitchToDesktop
  11. Replies
    5
    Views
    1,668

    Re: Service, User and Interact with desktop

    If the service is running in the security context of a user account, the system will create a unique Window station and Desktop for that service, use the SetProcessWindowStation() and...
  12. Re: Accessing data files through Memory Mapping

    maybe this will help:


    if(ptr != NULL)
    {
    hOffset = ptr-pData+4;
    memcpy(pData, ptr+4, dwFileSize-hOffset);
    SetFilePointer(hFile, dwFileSize-hOffset,NULL, FILE_BEGIN);
    ...
  13. Replies
    7
    Views
    1,957

    Re: Trouble with mbstowcs() function

    wchar_t* wPath = (wchar_t*)malloc((strlen(Path) +1) * sizeof(wchar_t));
  14. Replies
    7
    Views
    1,957

    Re: Trouble with mbstowcs() function

    wchar_t* wPath = (wchar_t*) calloc (strlen(Path) + 1, sizeof(wchar_t));
    mbstowcs(wPath, Path, strlen(Path));
  15. Replies
    6
    Views
    904

    Re: Save registry into a file.

    You need the SE_BACKUP_NAME privilege enabled, which exists in your process token but not enabled by default, use AdjustTokenPrivileges
  16. Replies
    2
    Views
    1,636

    Re: Unique user session ID?

    try LsaEnumerateLogonSessions with LsaGetLogonSessionData
  17. Replies
    10
    Views
    9,099

    Re: Cannot CreateProcess in service

    It seems that CreateProcessWithLogonW cannot be called from a process under the LocalSystem account, read KB285879
  18. Replies
    5
    Views
    2,714

    Re: Problems with Setting DACL permissions

    I don’t think it's possible, maybe you need to build a new dacl with only one ace - everyone full control, and replace existing dacl with SetNamedSecurityInfo()/SetSecurityInfo()
  19. Replies
    5
    Views
    2,714

    Re: Problems with Setting DACL permissions

    What do you want to accomplish? If you just want to add a NULL Dacl (everyone full control) to the handle, try SetSecurityInfo().



    dwError = SetSecurityInfo(
    (HANDLE)File.m_hFile,
    ...
  20. Replies
    5
    Views
    2,714

    Re: Problems with Setting DACL permissions

    The security descriptor must be in absolute format, you got a self-relative format by specifying only DACL_SECURITY_INFORMATION in GetSecurityInfo()
  21. Replies
    10
    Views
    9,099

    Re: Cannot CreateProcess in service

    Does the user have full access to the interactive window station/desktop ?
    check this sample, it doesn't use the same function but it could solve your problem
  22. Replies
    4
    Views
    5,630

    Re: GetTempPath(...) API help...

    ExpandEnvironmentStrings
  23. Replies
    4
    Views
    5,630

    Re: GetTempPath(...) API help...

    you can get it from the registry -
    HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
  24. Re: need help about get process authority!!thanks

    In OpenProcessToken() use TOKEN_QUERY instead of TOKEN_READ
  25. Thread: shmget

    by AdaraCD
    Replies
    5
    Views
    2,923

    Re: shmget

    The function fails if the size value is less than SHMMIN or greater than SHMMAX as defined in /etc/system
Results 1 to 25 of 350
Page 1 of 14 1 2 3 4





Click Here to Expand Forum to Full Width

Featured