开发者

How to programatically create virtual IP Addresses in VB?

What I want to do is use one PC to test an application on another on the same 19.2.168.X.X

I would like to make it seem like SOAP requests are coming from a variety of different PCs, just to make the applciations log file easier to read and I have been told that virtual IP Addresses ar开发者_运维技巧e the way to go. So, how do I defien a range and then use them one by one in VB? (I guss that this is effectively IP header spooging?)


Not exactly sure what you want to do but I'd suggest first looking at the WMI class Win32_NetworkAdapterConfiguration to see if you can do what you want with it.

If that class does not support it you might have to use INetCfg instead, where I think you can change pretty much any network settings, but it's a bit more difficult to use. Here's a codeproject article for using INetCfg from C# which might at least show you how to get started.


If you just want to create a random IP address, generate 4 random numbers from 0 to 255 and glue some dots between them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜