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

szcococut

@szcococut
About
Posts
28
Topics
18
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • My dll wrote in MFC can't register on one pc ,but another can!
    S szcococut

    hi my dll can't register on one pc ,but can register on another pc, why? the error is :" *.dll DllRegisterServer failed ,error code is :0x8007007 " thanks

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

  • is there an Opera Control just like ie control for IE?
    S szcococut

    thanks

    C / C++ / MFC question

  • how to use IWebBrowser2::NavigateError?
    S szcococut

    had got it , ON_EVENT(CBrowserPage, IDC_EXPLORER1, 271 , NavigateErrorExplorer1,VTS_DISPATCH VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PBOOL) can work thanks

    C / C++ / MFC tutorial question

  • how to use IWebBrowser2::NavigateError?
    S szcococut

    my code: BEGIN_EVENTSINK_MAP(CBrowserPage, CDialog) //{{AFX_EVENTSINK_MAP(CBrowserPage) ON_EVENT(CBrowserPage, IDC_EXPLORER1, 271 , NavigateError, VTS_DISPATCH VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PBOOL) ON_EVENT(CBrowserPage, IDC_EXPLORER1, 252 /* NavigateComplete2 */, OnNavigateComplete2Explorer1, VTS_DISPATCH VTS_PVARIANT) //}}AFX_EVENTSINK_MAP END_EVENTSINK_MAP() OnNavigateComplete2Explorer1 can work, NavigateError can't work,why? my ie is 6.0 thanks!

    C / C++ / MFC tutorial question

  • How to play a buffer(not a file or url) with window media player?
    S szcococut

    I get data from my server by socket , it is asf(*.asf) data. can't to save a file , because when I get the data, must to play at once. I want to play the data with window media player, how to? thanks!

    C / C++ / MFC sysadmin tutorial question

  • FindFirstPrinterChangeNotification() fail!
    S szcococut

    Blake Miller: can you tell how to open one from the local administrator account? thanks! cococut

    C / C++ / MFC help sysadmin tutorial question

  • how to forbid printing by local printer or network printer?
    S szcococut

    I want to use my exe (installed in someone's computor) to forbid someone printing by his local printer or network printer! how to implement? thanks

    C / C++ / MFC sysadmin tutorial question

  • FindFirstPrinterChangeNotification() fail!
    S szcococut

    Iuse Administrator to Logged on My widnow xp. I enum the share printer connected in the network. I use openprinters() to open the printer ,it success. I get the printer handle. then I use FindFirstPrinterChangeNotification() to Monitor the printer ,it fail ,the Error code is 5(ERROR_ACCESS_DENIED). but if Use the domain user to logged on my window xp(just like: domain1\\user1), all is good . why? what different between of administrator(local) and domain1\\user1(domain)? how to fix it? thanks! my code like this: hPrinterNotification = FindFirstPrinterChangeNotification( ThreadParam.hPrinter, PRINTER_CHANGE_DELETE_JOB, 0, &NotificationOptions); if (hPrinterNotification == INVALID_HANDLE_VALUE) { CString strE; strE.Format ("FindFirstPrinterChangeNotification failed! Error code = %d",GetLastError()); return 0; } -- modified at 21:47 Monday 27th February, 2006

    C / C++ / MFC help sysadmin tutorial question

  • I Call CreateProcess() ,it failed,the Errorcode is 299,why?
    S szcococut

    I call CreateProcess() to Start another exe,but it fail, I use GetLastError() ,the ErrorCode is 299; my code is: CString strUninstallProc = "c:\\1.exe"; char buffer[20]; CString strCommandLine = " /n "; strCommandLine += " /p 873w "; strCommandLine += strPartCmdLine; PROCESS_INFORMATION piProcInfo; STARTUPINFO siStartInfo; ZeroMemory(&piProcInfo, sizeof(PROCESS_INFORMATION)); ZeroMemory(&siStartInfo, sizeof(STARTUPINFO) ); siStartInfo.cb = sizeof(STARTUPINFO); BOOL bCreation = CreateProcess(strUninstallProc, strCommandLine.GetBuffer(strCommandLine.GetLength()), NULL, NULL, TRUE, 0, NULL, NULL, &siStartInfo, &piProcInfo); strCommandLine.ReleaseBuffer(); if (bCreation) {} else {} thanks

    C / C++ / MFC question

  • call FindFirstPrinterChangeNotification() Get Error 997?
    S szcococut

    /* reinitialize the Termination Event so we can proceed */ ResetEvent(g_hTerminateEvent); hPrinterNotification = FindFirstPrinterChangeNotification( ThreadParam.hPrinter, /* The printer of interest */ PRINTER_CHANGE_DELETE_JOB, /* We need to know when a job is removed */ 0, /* reserved */ &NotificationOptions); /* The details of what notifications that are needed */ /* Check for an error */ if (hPrinterNotification == INVALID_HANDLE_VALUE) { LPVOID lpMsgBuf; FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language (LPTSTR) &lpMsgBuf, 0, NULL ); MessageBox( NULL, (LPCTSTR)lpMsgBuf, "Error", MB_OK | MB_ICONINFORMATION ); LocalFree( lpMsgBuf ); return 0; } /* * Loop on the Notifications, a terminate event, or a refresh event */ /* setup for a WaitForMultipleObjects */ Handles[0] = hPrinterNotification; Handles[1] = g_hTerminateEvent; Handles[2] = g_hForceRefreshEvent; /* Initialize for our local data structure */ ZeroMemory(&Queue, sizeof(Queue)); Queue.Printer.hPrinter = ThreadParam.hPrinter; /* Initialize the display and our local copy of the printer queue data */ CPrinterJob::Refresh(ThreadParam.hWnd, &Queue); /* * Loop while we are stilling waiting on Notifications. */ while (hPrinterNotification != INVALID_HANDLE_VALUE) { /* wait for a printer notification, terminate event, or refresh event */ WaitForMultipleObjects(3, Handles, FALSE, INFINITE); /* check to see if the thread needs to quit. */ if (WaitForSingleObject(g_hTerminateEvent, 0) == WAIT_OBJECT_0) { /* This should be the only way out of the loop */ FindClosePrinterChangeNotification(hPrinterNotification); hPrinterNotification = INVALID_HANDLE_VALUE; } /* or check to see if the notification object for the printer queue is signaled */ else if (WaitForSingleObject(hPrinterNotification, 0) == WAIT_OBJECT_0) { /* get the changes and reset the notification */ if (!FindNextPrinterChangeNotification(hPrinterNotification, &WaitResult, /* for the PRINTER_CHANGE_DELETE_JOB notice */ &NotificationOptions, /* The notifications */ (void **)&pNotification)) /* address of pointer t

    C / C++ / MFC debugging help question announcement

  • call FindFirstPrinterChangeNotification() Get Error 997?
    S szcococut

    when I call FindFirstPrinterChangeNotification(), in release ,Get Fail,the Error code is 997,it mean the overload I/O is handing..... but In debug,it's ok! why? thanks

    C / C++ / MFC debugging help question announcement

  • hide process Error!
    S szcococut

    up!

    C / C++ / MFC help tutorial question workspace

  • hide process Error!
    S szcococut

    I use LoadLibrary( "ntdll.dll" ) to hide process! just like : hNtDLL = LoadLibrary( "ntdll.dll" ); RtlInitUnicodeString = (CProcessHide::RTLINITUNICODESTRING)GetProcAddress( hNtDLL, "RtlInitUnicodeString"); ZwOpenSection = (CProcessHide::ZWOPENSECTION)GetProcAddress( hNtDLL, "ZwOpenSection"); ............. but in window 2000 pro : 1,some compuctors can start up and hide process; 2,some compuctors can start up but can't hide process; 3,some compuctors can't start up the exe. Show Error like this: "now Creating Error Log!" if I Setup vc6.0 in the compuctors which can't Start up the exe. the exe can Start up ,and Hide process! why? how to fix it ? thanks braden -- modified at 3:00 Monday 19th December, 2005

    C / C++ / MFC help tutorial question workspace

  • Memory Leak In this function?
    S szcococut

    thanks Steen ! it just What I want!

    C / C++ / MFC performance question announcement

  • Memory Leak In this function?
    S szcococut

    I try like this: delete STATURL.pwcsUrl; delete STATURL.pwcsTitle; but I get an excetion!

    C / C++ / MFC performance question announcement

  • Memory Leak In this function?
    S szcococut

    to Steen Krogsgaard how to free STATURL.pwcsUrl and STATURL.pwcsTitle can you tell me?

    C / C++ / MFC performance question announcement

  • Memory Leak In this function?
    S szcococut

    BOOL GetHistory() { STATURL url; CString strUrl; ULONG uFetched; IUrlHistoryStg2Ptr history; IEnumSTATURLPtr enumPtr; if(FAILED(CoCreateInstance(CLSID_CUrlHistory, NULL, CLSCTX_INPROC_SERVER, IID_IUrlHistoryStg2,(void**)&history))) { return false; } if(FAILED(history->EnumUrls(&enumPtr))) { history->Release(); return false; } while(SUCCEEDED(enumPtr->Next(1,&url,&uFetched))) { if(uFetched==0) break; } history->Release(); return true; } if I set a timer to call the function ,the memory leak if I delete while(SUCCEEDED(enumPtr->Next(1,&url,&uFetched))) { if(uFetched==0) break; } memory is good ! why? thanks!

    C / C++ / MFC performance question announcement

  • how to get print message if you click print a document by Microsoft word?
    S szcococut

    if you click print a document by Microsoft word, I want to get the print message in my application,how to do that? a hook can do that ? thanks! braden -- modified at 21:40 Tuesday 1st November, 2005

    C / C++ / MFC tutorial question

  • how to get the file's full path from printer queue?
    S szcococut

    I use the EnumJob to get the job from printer my local or network printer. every job include pszdocument,page,bytes,user so on . if I use microsoft word to print,the pszdocument is only the file name,just "microsoft word 11.doc". but if Use UltraEdit to print,the pszdocument is the file's full path,just "c:\\tmp\1.txt". why? I want to know the file's full path by using word to print, how to do that? -- modified at 21:19 Sunday 30th October, 2005

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

  • how to hide the Firewall dialog when my exe run?
    S szcococut

    thanks Swelborn! Can you email the code to me? or any message about the fireware registry issue! or tell me how to do that! it is my mail:cococut@msn.com

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