Hi Lloyd,
Tried them all. All but the IP based give an error creating the socket. So
no hopes on getting this working.
I've found several packet capture drivers that could work from within .net
but I'm hasitating using a packet capture driver which needs to be installed
separately. Besides this, some need administrative permissions to access,
which I cannot use either.
So ....
Erik
> I'm sure that in the owrst case scenario you could interop the required
> native function
[quoted text clipped - 17 lines]
>>
>> Erik Tamminga
Lloyd Dupont - 04 Jul 2005 00:42 GMT
well, it seems to me that the best solution in your case, provided you know
how to write what you want in C, is to use Interop technology.
Interop is the technology which let you declare you C function prototype in
a C# class and then just uses them!
exemple:
//------------ example.cs -----------------
using System.Runtime.InteropServices;
using System.Security;
[SuppressUnmanagedCodeSecurity] // better perf, less security
public class SysFunctions
{
const string KERNEL32 = "Kernel32";
[DllImport(KERNEL32, SetLastError = true, CallingConvention =
CallingConvention.Winapi)]
private static extern IntPtr LoadLibrary(string libname);
public static void Init()
{
if(LoadLibrary("mylib.dll") == IntPtr.Zero)
throw new InvalidOperationException("can't find mylib");
}
}
// -------------------
Look for interop in the documentation. (just type 'interop' in the
documentation index, or try google ;)
Alternatively you could write a managed C++ wrapper, if there are heaps of
function / structure to defined.
That would gives you the more power with less work to do (but comes with a
lot of C++ fussyness).
Here is a link about managed C++ 2.0 syntax:
http://msdn2.microsoft.com/library/xey702bw(en-us,vs.80).aspx
// ------ exemple.h ---------
#pragma once
#include <windows.h>
using namespace System;
public ref class SysFunctions
{
public:
static void Init()
{
HMODULE h = LoadLibrary("mylib.dll");
if( !h )
throw gcnew InvalidOperationException("Can't find mylib");
}
};
// -------------------------
> Hi Lloyd,
>
[quoted text clipped - 31 lines]
>>>
>>> Erik Tamminga
Lloyd Dupont - 04 Jul 2005 00:52 GMT
on purely personal interest level, what is your website about? (I don't
speak dutch, but I do french & australian)
I have some personal interest in cooking + software...
try ld at galador dot net or , dl at ten dot rodalag dot reverse dot this,
hehe...
> Hi Lloyd,
>
[quoted text clipped - 31 lines]
>>>
>>> Erik Tamminga
Erik Tamminga - 06 Jul 2005 21:10 GMT
My website?
> on purely personal interest level, what is your website about? (I don't
> speak dutch, but I do french & australian)
[quoted text clipped - 37 lines]
>>>>
>>>> Erik Tamminga
Lloyd Dupont - 06 Jul 2005 23:47 GMT
> My website?
euh.. yeah: www.tamminga.nl , no?
Erik Tamminga - 09 Jul 2005 20:02 GMT
Nop, Sorry, that's a backery somewhere in the netherlands. I'm not related
to them.
my website is www.etamminga.nl, but doens't have any content. :)
Erik
>> My website?
>
> euh.. yeah: www.tamminga.nl , no?