[Winpcap-users] Distribute Winpcap Files with my app

Loris Degioanni loris.degioanni at gmail.com
Fri Aug 12 08:05:10 GMT 2005


Sure.

Loris


Srivatsan wrote:
> 
> Hi,
> 
> Can I redistribute WinPCap in the following mentioned way ?
> i.e., Package wpcap.dll, packet.dll, wanpacket.dll, npf.sys with my 
> application and then Create a Windows Service as this Thread suggests.
> I believe the license allows it. Just asking for a confirmation.
> 
> Thanks,
> Srivatsan.
> 
> 
> ZhiyuHe wrote:
> 
>>If your application is designed for Win2000/XP/2003,you can copy
>>wpcap.dll,packet.dll,wanpacket.dll (they're in %systemroot%\system32)
>>and put them in the directory of your application,and copy npf.sys,put
>>it in %systemroot%\system32\drivers,then create a service for this
>>driver. for example:
>>
>>	SC_HANDLE scmHandle=NULL;
>>	SC_HANDLE srvHandle=NULL;
>>	LPCTSTR NPFServiceName=TEXT("NPF");
>>	LPCTSTR NPFServiceDesc=TEXT("Netgroup Packet Filter");
>>	LPCTSTR NPFDriverPath=TEXT("system32\\drivers\\npf.sys");
>>	char DriverPath[50];
>>	
>>	GetWindowsDirectory(DriverPath,12);
>>	lstrcat(DriverPath,"\\system32\\drivers\\npf.sys");
>>	
>>	if(!CopyFile("npf.sys",DriverPath,FALSE))
>>		return 1;
>>	
>>	scmHandle=OpenSCManager(NULL,NULL,SC_MANAGER_ALL_ACCESS);
>>	if(scmHandle) 
>>	{
>>    		srvHandle=CreateService(scmHandle,
>>        		NPFServiceName,
>>        		NPFServiceDesc,
>>        		SERVICE_ALL_ACCESS,
>>        		SERVICE_KERNEL_DRIVER,
>>        		SERVICE_DEMAND_START,
>>        		SERVICE_ERROR_NORMAL,
>>        		NPFDriverPath,
>>        		NULL,NULL,NULL,NULL,NULL);
>>    		if(srvHandle)
>>    			CloseServiceHandle(srvHandle);
>>    		
>>    		CloseServiceHandle(scmHandle);
>>    	}
>>
>>On 8/5/05, Nick Koranda <nkk at eml.cc> wrote:
>>  
>>
>>>Thanks Eric,
>>>
>>>Do I need to "install" any device drivers?  (I see npf.sys and npf.vxd files
>>>in the setup.exe file).
>>>
>>>Thanks
>>>Nick Koranda
>>>
>>>    
>>>
>>
>>_______________________________________________
>>Winpcap-users mailing list
>>Winpcap-users at winpcap.org
>>https://www.winpcap.org/mailman/listinfo/winpcap-users
>>
>>  
>>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users


More information about the Winpcap-users mailing list