Cygwin in VisualStudio / CodeBlocks. How to Link an external DLL

Hi people,
Cygwin provide a really nice DLL that would help to use linux libraries in windows system. Add the end, I would like to add unix socket libraries to openFrameworks windows. ofxSick addon would needed to run under windows. Using Cygwin libraries seems to be possible…

In the documentation says, use Gcc in Cygwin that would mean to compile OF inside the cygwin environment. But I’m not really shure about…if anyone knows…¿that could be possible? Any way, the ideal would be to use some windows IDE like VS or codeblocks.

Then, as far I could find in helper areas: Using Cygwin with Microsoft cl or Linking DLL in question**#16**Cygwin-FAQ-programming. Best way may be linking Cygwin DLL to the projects, dynamically or estatically.

Anyone has anyone experience linking DLLs to OF? Any help would be apreciated.

How should I use this load library? What about headers?

#include <sys/socket.h>  
HMODULE h = LoadLibrary("cygwin1.dll");  

I know this is C++ Windows question… but I guess that could help also others to use external libraries in OF.