HOME Delphi PHP C# chkdsk C++ ShellExecute CGI C# CGI C# CGI Example C# CGI Sample GetDriveType Datagram PostMessage UDP Receive Removable Disk Detection UDP formatted date Referrer QUERY_STRING getenv GetEnvironmentVariable SOCK_DGRAM Linked List BrowseDialog URLDecode WWW Server Source BinarySearch Kill Application BinaryReader Mass Storage Device MFC MFC CGI Example Morris Image Processing AuxGetVolume Pratt ASCII RAM Drive Detection Ansi C Refferiong URL Amazon CloudFront Removable Media Detection Amazon CGI Example Creating Thumbnail Client/Server CGI Sample Double Linked List Drive Type Event Call Access Key FindWindow Image Resizing CD ROM Drive Detection GetAsyncKeyState CAsyncSocket HTTP Daemon HTTP Server HTTP Server Source HTTPServer

C++.ZIP

Double Linked List based in C++   (created at Sep 08, 2007)   62  

Below is the double linked list example that based on console.Specially this application use macro by define function provided by ANSI C.It's just like inline function that C++ provides.

URL Encode, Decode function for MFC   (created at Mar 23, 2009)   135  

Here's the good example for URL Encoding & Decoding.  Above sample code use CString, so if you want to use it on another type of development environment such as gcc or something like that, you need to add some more stuffs because it may not suppo...

How to load HTML resource on MFC ?   (created at Mar 23, 2009)   145  

I tried to load HTML resource that stored in the application for MFC based application programming. The resource name is IDR_KURAPA_COM_HTML_ROOT.Actually this is very convenient to reduce files for application package.You can load HTML resource as followi...

KMP String Matching Algorithm   (created at Jul 21, 2010)   112  

KMP String Matching Algorithm is well-known algorithm for faster string search. KMP is, as you know, Knuth, Morris, and Pratt. It's complexity is O(n). n is the length of target string and O is big-O notation.Here's the implemented algorithm.//////////////...

How to search file on certain directory ?   (created at Jun 15, 2008)   56  

In case of finding files on certain directory, you need to use FindFirstFileEx function.Following example shows the example,bool KFindFile(void *findname){    WIN32_FIND_DATA FindFileData;    HANDLE hFind;    CString strSearch...

How to call SetTimer function on MFC CDialog class ?   (created at Jul 30, 2008)   91  

Hi, problem with MFC Dialog based app: In OnInitDialog: Code: SetTimer( WM_USER+100, 500, NULL ); In OnTimer: Code: MessageBox(... CDialog::OnTimer(nIDEvent); But OnTimer never reached. Why? When i call SendMessage( WM_TIMER, 0, 0); OnTimer calls succesful...

How to run shell command by MFC ?   (created at Sep 09, 2007)   65  

Followings are the useful example can run shell command./*    Programmed 1998 by Kurapa Chunun Kang (kurapa@kurapa.com)    By below function, you can run shell command easily.*/#include void KShellExecute(HWND handle, LPCTST...

Binary Search Sample Code   (created at Sep 08, 2007)   77  

This is Binary search that returns a negative one if the number is not found.This code does a bubble sort and then proforms the binary search.#include

Using the shell to receive notification of removable media being inserted or removed   (created at Aug 28, 2007)   45  

Recently I needed to determine when removable media, such as a zip disk or media card, had been inserted by the user. I initially looked into the WM_DEVICECHANGE broadcast message only to realise this supports CDROMs and little else. Fortunately there is a...

UDP Send and Receive Using CAsyncSocket   (created at Aug 28, 2007)   47  

The following is sample code showing use of CAsyncSocket to send and receive UDP packets. I used the ClassWizard to create a class (CUDPSocket) derived from CAsyncSocket. The derived class does little more than override OnReceive. The derived class is used...

Creating and Using a CAsyncSocket Object to use CAsyncSocket   (created at Aug 28, 2007)   102  

Followings are the procedure to send/receive UDP packet by CAsyncSocket.STEP 1. ConstructionConstruct a CAsyncSocket object and use the object to create the underlying SOCKET handle.Creation of a socket follows the MFC pattern of two-stage construction.For...

MFC based World Wide Web HTTP Server Source Code   (created at Aug 28, 2007)   87  

The below attachment is HTTP Server source code that supports CGI. Detail Description: HTTPSVR is an MFC sample that demonstrates the use of MFC and its Windows Sockets (WinSock) classes in implementing a simple World Wide Web HTTP server. HTTPSVR turns an...

C++ CGI Example working on Apache   (created at Aug 27, 2007)   60  

In this short howto I will explain how to setup your apache webserver to run any compiled application as an CGI script and show a little example program to explain the main concepts. So why does someone might have the idea to execute an application? There ...

Simple CGI Programming in C   (created at Aug 27, 2007)   83  

Here's the simplest C based CGI example. #include #include int main(void){    char *data;    printf("Content-Type:text/html;xdxa"); ");&n...

Fast and Good Keyboard/Mouse Test without the message handler   (created at Aug 27, 2007)   96  

In this short snippet, I will show you a Win32 function that checks whether a button is pressed or not. The good thing is that you don't need to handle the WM_KEYDOWN message. The second advantage is that it is really easy to use and that it can be used ev...

How to get reffering URL ?   (created at Oct 15, 2007)   49  

Grabs the referring URL - get the HTTP_REFERER and save it to a variable.code snippet:

How to Close Another Application by Windows Caption   (created at Sep 18, 2007)   65  

To programmatically close another application, send to the application a WM_QUIT message. "Window caption" is the caption of the window that you are sending the message to. Usage: if not KillApp('Window caption') then ShowMessage('App not closed') ;Here's ...

Simple C# CGI working on Apache   (created at Aug 27, 2007)   38  

Simple program to demonstarte the power of c# on the Net. This program require web server e.g(java web server ,apache etc).Hello.csclass zzz{  public static void Main()  {    System.Console.WriteLine("Content-Type:text/html ");  &n...

How to send binary data through C# CGI app?   (created at Aug 27, 2007)   66  

Following example implemented binary data downloading.using System;using System.Collections.Generic;using System.Text;using System.IO;namespace cscgi{  class CsCGI  {    private static string dbgString = "id=1234&pic=123.gif";  &nb...

Get The Drive Type   (created at Aug 25, 2007)   61  

Shows how to identify the type of the drive you are acessing.procedure TForm1.Button1Click(Sender: TObject); var   typ:Integer;   s: string; begin   s:='C:';   typ:=GetDriveType(PChar(s));   if Typ <> 0 then case typ of   &nbs...