View Full Version : No Winsock OCX??
Adam Shapiro
15-01-2003, 20:33
I wrote an app a little while ago in VB6 that used a winsock control to get updates from a Counter-Strike server. After reformatting, I was unable to find my VS6 CD but I figured it would be ok since I now had VS.NET. It seems that .NET does not come with the mswinsck.ock control file. I was wondering if there was a way to get this file? Maybe I can just copy another file from the new VS? Some help on this would be much appreciated.
Well you are right. .Net does not have Winsock. You have to use the sockets class. I am not sure how or what is required but I think it is similar to winsock. I would search the MSDN library or goto Microsoft.com and look for and example. I would also try looking at www.visualbasicforum.com or www.winsockvb.com . They are great forums that should help you with what you are doing. I hope this helps. Good luck.
This address should also help:
http://msdn.microsoft.com/vbasic/downloads/samples/default.asp
Jeremy_Mc
16-01-2003, 17:52
yes .NET you have to use the sockets class...
you have to import/reference it, create a new instance (with code), then call events from it.
stupid .NET...they took the basic outta vb. gimme visual studio 6 and i'm happy :p
*jeremy
Curtis Williams
16-01-2003, 19:49
i wanted to learn .net programming and decided to move up to C# since vb has gotten more complex anyway.
Adam Shapiro
16-01-2003, 20:00
I agree. I installed .NET yesterday and I am already confused! It seems like they mushed C++ and VB together to come up with a "super" language... It was like you used VB scripting rules with a C++ class-based interface. I couldn't figure it out. I tried a simple cout C++ program (the generic "Hello World!") with iostream but it wouldn't display... Too confusing...
rwaliany
16-01-2003, 21:30
I don't seem to be having any problems. The only things I really hve to change in my C++ programming is when I call like std::vector<int> temp;
temp.size(); = unsigned int
Eventually, which gives me a linking error
for(int i = 0; i < temp.size(); i++)
^ wrong
for(unsigned int i = 0; i < temp.size(); i++)
^ correct
My DirectX building classes seem to work fine, but I use like all std:: stuff except for win32 and DX code.
I don't recommend using MSVC++ .NET for simple console applications
#include <iostream>
int main(int argc, const char* argv[])
{
std::cout << "Hello World!" << std::endl;
return 0;
}
Just made me a 452KB executable...
Pfft. what does it do, recreate the console, with it's own original paint functions without calling dlls, etc?
Well, at least my DirectX client for one of my games was reduced from 240KB to 150KB. It's not much of a game, just sockets which connect to my C server, directdraw, input, music...
oh yeah, trying std::library in precompiled headers doesn't seem to work, but it works in VSC++ 6.0, go figure. Actually it does, but it doesn't seem to work for some streamed classes. IE: iostream and string.
I tried a simple cout C++ program (the generic "Hello World!") with iostream but it wouldn't display... Too confusing...
Create a win32 project, go to some additional options tab, and make it console based. Get rid of precompiled headers too.
I haven't looked at VB .NET, but C++ 7.0 doesn't look different to me at all vs. 6.0. It's a lot nicer, but still isn't very good for simple applications (console based). I would probably recommend pcgrasp with the borland C++ library/compiler "freecommandlinetools.exe". Search yahoo or something.
Adam Shapiro
16-01-2003, 23:04
Thanks for the advice. I to get the mswinsck.ock file that my program required I reinstalled VS 6 rather than rewrite the source for the program. I think it will just take me some time to get into .NET. For now though, I think I will stick with 6. I need to work on my DirectX for the new, 3d dashboard program... By the way, anyone who wants to help on the program, I would love the assistance...
yangotang
19-01-2003, 16:46
Forget M$ VisualStudio.Net..
I'm still sticking to CodeWarrior Release 7 to do my code work.
I hate M$ anyways. M$ is the devil.
--yang
rwaliany
19-01-2003, 17:04
M$ is the devil. But that's where all the money is.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.