
Create method
Creates new devP2P class instance.
Syntax
- C#
- C++
- VB.NET
IntPtr devP2P.Create();
The Create() syntax has these parts:
The Create() syntax has these parts:
Return value | Reference to new created CP2P instance. |
static CP2P *CP2P::Create(void);
The Create() syntax has these parts:
The Create() syntax has these parts:
Return value | Reference to new created CP2P instance. |
Function P2P_Create() As IntPtr
The Create() syntax has these parts:
The Create() syntax has these parts:
Return value | Reference to new created CP2P instance. |
Remarks
This is a static method that creates new instance of devP2P. After instance is successfully obtained and used, you should destroy it using Destroy method.You should not delete the instance by yourself. Always use Destroy method instead.
Make sure you initialized the library first, by calling libInit function!
Code sample
- C++
// Initialize devP2P library
devP2Plib::libInit();
devP2Plib::upnpInit();
// Give some time for UPNP to exchange packets
Sleep(200);
devP2Plib::CP2P *p1 = devP2Plib::CP2P::Create();
// ... //
devP2Plib::libInit();
devP2Plib::upnpInit();
// Give some time for UPNP to exchange packets
Sleep(200);
devP2Plib::CP2P *p1 = devP2Plib::CP2P::Create();
// ... //
Platforms
WindowsMac OSX
Linux
BSD