No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
15 Posted Topics
A most basic TCT connection is established with the code below: [CODE]// Initialization IPEndPoint m_IpEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.71"), 5000); Socket m_Socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); NetworkStream m_Stream = new NetworkStream(m_Socket); // Read/write operations m_Stream.Write(System.Text.Encoding.ASCII.GetBytes("Hello world!"), 0, 12); byte[] read_buffer = new byte[4096]; m_Stream.Read(read_buffer, 0, 4096); // Closing open resources … | |
This sample code is from [URL="http://msdn.microsoft.com/en-us/library/aa287786%28VS.71%29.aspx"]MSDN[/URL]. [CODE]private string name; public string Name { get { return name; } set { name = value; } }[/CODE] I looked several examples, and they are the same. Why do we keep two different properties to store the name, namely "name" and "Name". I … | |
[B]MyClass.h[/B][CODE]class MyClass { //... public: template <class T> static void Swap(T& Var1, T& Var2); //... }[/CODE] [B]MyClass.cpp[/B][CODE]template <class T> void MyClass::Swap( T& Var1, T& Var2 ) { Var1 ^= Var2; Var2 ^= Var1; Var1 ^= Var2; }[/CODE] In another file[CODE]#include "MyClass.h" //... int n = 40; int m = 60; … | |
I have this C++ code :[code] const int ANYSIZE_ARRAY = 1; struct LUID {DWORD LowPart; WORD HighPart;}; struct LUID_AND_ATTRIBUTES {LUID Luid; DWORD Attributes;}; struct TOKEN_PRIVILEGES {DWORD PrivilegeCount; LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];};[/code]I want to convert this code into C# syntax. I tried this one, but don't know how to place array in a … | |
I have two buttons in my main window frame, named btStart and btStop. btStop is initially disabled. I want to write down such a code that , -when user clicks btStart, btStart will be disabled and btStop will be enabled, -when user clicks btStop, btStop will be disabled and btStart … | |
I have a 1TB Maxtor Basics external hard drive. After a power cut, I lost access to the entire data in it; I couldn't see the drive in my computer but the system was slowing down and getting stuck about every 10 seconds periodically. First I tried running CHKDSK.EXE, but … | |
I receive an error on system startup like the one in the attachment. But php_mysql.dll file actually is in C:\Prog\SERVER\PHP\ext folder in my computer. How can I change this incorrect setting? | |
I'm trying to create a libmysql.a file for my Dev-C++ project. Parameters for dlltool is as below : [IMG]http://img527.imageshack.us/img527/8911/beforeco4.jpg[/IMG] But the output libmysql.a file is not proper, it doesn't contain anything. [IMG]http://img72.imageshack.us/img72/1707/afterpj1.jpg[/IMG] What am I doing wrong? | |
Re: There is no way VS C++ doesn't contain windows.h in its include folder; when the pigs fly... You had better search for that file using windows' search tool or using something like Google Desktop. | |
I want to create a low level keyboard hook. I tried the code below : [code]LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam) { if (nCode < 0) return CallNextHookEx((HHOOK) WH_KEYBOARD_LL, (int) nCode, (WPARAM) wParam, (LPARAM) lParam); DebugText("KB Event!"); return (LRESULT) NULL; } HHOOK hHook; hHook = (HHOOK) SetWindowsHookEx( (int) … | |
Hello, I am going to study MySQL on my web server. I would like to ask if there is a useful GUI tool for MySQL to create/delete tables and browse entries on my database. | |
Hello, I want to embed a mail server on my computer. For that purpose I've installed MDaemon v9.5.3 on my computer. Now what else do I have to do in order to send/recieve mail from different people? Should I have to change configuration settings in "PHP.ini" and/or "httpd.conf"? I always … ![]() | |
[IMG]http://www.contentmart.com/ContentMart/Create/images/dom.gif[/IMG] I want to ask if there is a way to access an obcect which is not in a form field. My textbook doesn't cover that topic. All the sample code in it is done with the form fields. The picture above illustrates the DOM object model that is used … | |
I suppose you know how to import Win32 API functions into C#. Like this : [code]BOOL ExitWindowsEx(UINT uFlags, DWORD dwReason); // Original Win32 function [DllImport("User32.dll")] public static extern bool ExitWindowsEx(uint uFlags, uint dwReason); // How to import into C#[/code] I want to import SetSuspendState() function, but don't know what DLL … | |
Hello, I want to create a WebBrowser control in my Win32 project using DevCPP. I had a search in MSDN. Creating a WebBrowser control looks like far different than creating a button or edit control. I have no idea what code should I write. Any answer will be apreciated. |
The End.