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
Y

yanping wang

@yanping wang
About
Posts
22
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to create a virtual printer?
    Y yanping wang

    Can you help me to download Pdf995 and email to me(whitegest@sohu.com)? the website you tell me is blocked here(i am in China). thank you a lot.

    C / C++ / MFC question tutorial

  • How to create a virtual printer?
    Y yanping wang

    thank you very much

    C / C++ / MFC question tutorial

  • How to create a virtual printer?
    Y yanping wang

    I want to intercept print task, How can i create a virtual printer?

    C / C++ / MFC question tutorial

  • when "GlobalAlloc(GPTR, 100);" excute, why a "int 3" apear in Ntdll.dll?
    Y yanping wang

    before i call GetQueuedCompletionStatus function, GlobalAlloc have no problem. but after i call GetQueuedCompletionStatus function, many functions meet a "int 3" . why????????? in C++ sd

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

  • hello I wrote a Intermediate Driver, I want to install it by programming. Which functions should i use?
    Y yanping wang
    C / C++ / MFC question

  • raw socket in Windows XP
    Y yanping wang

    thank you very much. does TCP implementation exist in SP1?

    C / C++ / MFC help question

  • raw socket in Windows XP
    Y yanping wang

    I created a row socket in order to send raw TCP data using following code: SOCKET sRaw = socket(AF_INET,SOCK_RAW,IPPROTO_IP); int flag = 1; setsockopt(sRaw, IPPROTO_IP, IP_HDRINCL, (char*)&flag, sizeo(flag)); after i intialized buffer and dest address, i call sendto function send it: int nRet = ::sendto(sRaw, buff, sizeof(ipHeader) + sizeof(tcpHeader), 0, (sockaddr*)&in, sizeof(in)); if(nRet == SOCKET_ERROR) { printf(" sendto failed () %d \n", ::GetLastError()); return; } the result is sendto failed with error code : 10004. Why? help me, tell me why, how can i send raw TCP data using raw socket. my OS is Windows xp sp2.

    C / C++ / MFC help question

  • need help about p2p file transfer
    Y yanping wang

    yes. are there any code or articles about that?

    C / C++ / MFC sysadmin help question

  • need help about p2p file transfer
    Y yanping wang

    i want to transfer file between two hosts in different LANs, but there are NATs. I searched on the website, and ackownlaged that i need a third party server, but i don't kown the detailes of programming:confused:. can anyone give me a way or some hints? i will be very gratefull.

    C / C++ / MFC sysadmin help question

  • how to enume hosts of my LAN
    Y yanping wang

    thank you. the change you made is right. thank you very much

    C / C++ / MFC tutorial question

  • how to enume hosts of my LAN
    Y yanping wang

    my demo code is here(using WNet). it can not enume hosts: #include "../common/initsock.h" //#include "Ws2tcpip.h" #include #include #include #include #include CInitSock theSock; // to call WSAStartup function using namespace std; #include "Iphlpapi.h" #pragma comment(lib, "Iphlpapi.lib") #pragma comment(lib, "Mpr.lib") BOOL EnumRes(); void main() { EnumRes(); } BOOL EnumRes() { HANDLE hEnum; DWORD dw = ::WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_ANY, 0, NULL, &hEnum); if(dw != NO_ERROR) { printf(" OpenEnum failed \n"); } DWORD cCount = -1; u_char lpBuffer[1024*16]; DWORD cBufferSize = 1024*16; do { dw = ::WNetEnumResource(hEnum, &cCount, lpBuffer, &cBufferSize); NETRESOURCE *pRes = (NETRESOURCE *)lpBuffer; if(dw == NO_ERROR) { for(int i=0; i

    C / C++ / MFC tutorial question

  • how to enume hosts of my LAN
    Y yanping wang

    now I have succefully enumed hosts of my LAN by sending ARP request. but this require to install Ourself protocol driver to send ARP requests(SendARP does not fit). It worked very good.

    C / C++ / MFC tutorial question

  • how to enume hosts of my LAN
    Y yanping wang

    Thank you for your reply. The problem is that not every hosts have the ablity to enume hosts in LAN by using WNet functions. only the one which is a domain administrator have the ability. so i think the WNet functions do not fit me.

    C / C++ / MFC tutorial question

  • how to enume hosts of my LAN
    Y yanping wang

    Thank you . I download the demo, but it does not work too. we all use Windows SP2 system. Now i have found a way to achieve my purpose. i send ARP request to all Local ip addresses. the ones who reply my request exit in my LAN.

    C / C++ / MFC tutorial question

  • how to enume hosts of my LAN
    Y yanping wang

    xLANInfo does not work in my Computer at all. it use the WNet functions. can you provide me another method. thank you very much

    C / C++ / MFC tutorial question

  • how to enume hosts of my LAN
    Y yanping wang

    I need to enume the hosts of my LAN. I have tried to use WNet functions, but with little success. Can anyone provide me a way to achieve this?? thank you very much.

    C / C++ / MFC tutorial question

  • please help me. NAT problems in Chat program
    Y yanping wang

    I need to develop a software using which two hosts in different LANs can translate file. please provide me a simple way to solve the NAT problems, or please give me some hints. please..

    C / C++ / MFC help lounge

  • the full path name in device driver
    Y yanping wang

    IoCreateDevice's third parameter is DeviceName, while IoCreateSymbolicLink's first parameter is SymbolicLinkName. what is their full path name? I don't known the difference between "\\Device\\DrvFltIp","\\DosDevices\\DrvFltIp" or "\\??\\DrvFltIp"

    C / C++ / MFC question

  • about listing processes in system
    Y yanping wang

    can you tell me how the Task Manager list processes in system. I have make lots of tests, and found it use neither toolhelp functions or EnumeProcess functions. I want to drectly create a process that the Task Manager can not find with not using dll injection or remote thread. regards

    C / C++ / MFC

  • suspend process
    Y yanping wang

    here are some code used to suspend a process. since I do not known the exact problem you meet, I only show it for you: BOOL WINAPI SuspendProcess(DWORD dwProcessID, BOOL bSuspend) { // 取得OpenThread函数的地址 typedef HANDLE (__stdcall *PFNOPENTHREAD)(DWORD, BOOL, DWORD); HMODULE hModule = ::GetModuleHandle("kernel32.dll"); PFNOPENTHREAD OpenThread = (PFNOPENTHREAD)::GetProcAddress(hModule, "OpenThread"); if(OpenThread == NULL) return FALSE; // 取得指定进程内的线程列表 HANDLE hSnap; hSnap = ::CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, dwProcessID); if(hSnap != INVALID_HANDLE_VALUE) { // 遍历线程列表 THREADENTRY32 te = { 0 }; te.dwSize = sizeof(te); BOOL bOK = ::Thread32First(hSnap, &te); while(bOK) { if(te.th32OwnerProcessID == dwProcessID) { DWORD dwID = te.th32ThreadID; // 试图打开这个线程 HANDLE hThread = OpenThread(THREAD_SUSPEND_RESUME, FALSE, dwID); if(hThread != NULL) { // 暂停或者唤醒这个线程 if(bSuspend) ::SuspendThread(hThread); else ::ResumeThread(hThread); ::CloseHandle(hThread); } } bOK = ::Thread32Next(hSnap, &te); } ::CloseHandle(hSnap); } return TRUE; } I am a Chinese man, so the commentary is in Chinese. Regards

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