Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS

Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
This commit is contained in:
Cyd
2026-06-24 21:28:16 -05:00
commit 2b8ca921cb
66341 changed files with 7923174 additions and 0 deletions
@@ -0,0 +1,195 @@
// Data Server.cpp : Defines the entry point for the application.
//
#pragma warning (disable : 4786)
#include "stdafx.h"
#include "resource.h"
#include "data server.hpp"
#define MAX_LOADSTRING 100
std::map <int,std::vector<CDataEntry> > g_DataList;
// Global Variables:
HINSTANCE hInst; // current instance
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text
// Foward declarations of functions included in this code module:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
MSG msg;
HACCEL hAccelTable;
// Initialize global strings
LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadString(hInstance, IDC_DATASERVER, szWindowClass, MAX_LOADSTRING);
MyRegisterClass(hInstance);
// Perform application initialization:
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
}
hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_DATASERVER);
if (!InitRPC ())
return false;
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return msg.wParam;
}
//
// FUNCTION: MyRegisterClass()
//
// PURPOSE: Registers the window class.
//
// COMMENTS:
//
// This function and its usage is only necessary if you want this code
// to be compatible with Win32 systems prior to the 'RegisterClassEx'
// function that was added to Windows 95. It is important to call this function
// so that the application will get 'well formed' small icons associated
// with it.
//
ATOM MyRegisterClass(HINSTANCE hInstance)
{
WNDCLASSEX wcex;
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = (WNDPROC)WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_DATASERVER);
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = (LPCSTR)IDC_DATASERVER;
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL);
return RegisterClassEx(&wcex);
}
//
// FUNCTION: InitInstance(HANDLE, int)
//
// PURPOSE: Saves instance handle and creates main window
//
// COMMENTS:
//
// In this function, we save the instance handle in a global variable and
// create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
HWND hWnd;
hInst = hInstance; // Store instance handle in our global variable
hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, 100, 100, NULL, NULL, hInstance, NULL);
if (!hWnd)
{
return FALSE;
}
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
return TRUE;
}
//
// FUNCTION: WndProc(HWND, unsigned, WORD, LONG)
//
// PURPOSE: Processes messages for the main window.
//
// WM_COMMAND - process the application menu
// WM_PAINT - Paint the main window
// WM_DESTROY - post a quit message and return
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId, wmEvent;
PAINTSTRUCT ps;
HDC hdc;
TCHAR szHello[MAX_LOADSTRING];
LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);
switch (message)
{
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections:
switch (wmId)
{
case IDM_ABOUT:
DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
break;
case IDM_EXIT:
DestroyWindow(hWnd);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
EndPaint(hWnd, &ps);
break;
case WM_DESTROY:
CloseRPC ();
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
// Mesage handler for about box.
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
break;
}
return FALSE;
}
@@ -0,0 +1,166 @@
# Microsoft Developer Studio Project File - Name="Data Server" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=Data Server - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "Data Server.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Data Server.mak" CFG="Data Server - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Data Server - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "Data Server - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "Data Server - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /W3 /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib rpcrt4.lib /nologo /subsystem:windows /machine:I386
!ELSEIF "$(CFG)" == "Data Server - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib rpcrt4.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "Data Server - Win32 Release"
# Name "Data Server - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\commands.cpp
# End Source File
# Begin Source File
SOURCE=".\Data Server.cpp"
# End Source File
# Begin Source File
SOURCE=".\Data Server.rc"
# End Source File
# Begin Source File
SOURCE=".\data server_s.c"
# ADD CPP /YX
# End Source File
# Begin Source File
SOURCE=.\data.cpp
# End Source File
# Begin Source File
SOURCE=.\fileio.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=".\Data Server.h"
# End Source File
# Begin Source File
SOURCE=".\data server.hpp"
# End Source File
# Begin Source File
SOURCE=.\data.hpp
# End Source File
# Begin Source File
SOURCE=.\fileio.hpp
# End Source File
# Begin Source File
SOURCE=.\resource.h
# End Source File
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=".\Data Server.ico"
# End Source File
# Begin Source File
SOURCE=.\small.ico
# End Source File
# End Group
# Begin Source File
SOURCE=".\data server.acf"
# End Source File
# Begin Source File
SOURCE=.\ReadMe.txt
# End Source File
# End Target
# End Project
@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "Data Server"=".\Data Server.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
@@ -0,0 +1,80 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 5.01.0164 */
/* at Tue Mar 14 10:53:09 2000
*/
/* Compiler settings for data server.idl:
Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext, oldnames
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 440
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __data_server_h__
#define __data_server_h__
#ifdef __cplusplus
extern "C"{
#endif
/* Forward Declarations */
void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void __RPC_FAR * );
#ifndef __MW4DataServer_INTERFACE_DEFINED__
#define __MW4DataServer_INTERFACE_DEFINED__
/* interface MW4DataServer */
/* [implicit_handle][version][uuid] */
int StartRunID( void);
void RecordData(
/* [in] */ int id,
/* [in] */ int version,
/* [in] */ double time,
/* [in] */ int type,
/* [in] */ int objectid,
/* [in] */ float posx,
/* [in] */ float posy,
/* [in] */ float posz,
/* [in] */ int int1,
/* [in] */ int int2,
/* [in] */ int int3,
/* [in] */ int int4,
/* [in] */ float float1,
/* [in] */ float float2,
/* [in] */ float float3,
/* [in] */ float float4,
/* [string][in] */ const unsigned char __RPC_FAR *p5);
void FinishRun(
/* [in] */ int id);
extern handle_t data_server_IfHandle;
extern RPC_IF_HANDLE MW4DataServer_ClientIfHandle;
extern RPC_IF_HANDLE MW4DataServer_ServerIfHandle;
#endif /* __MW4DataServer_INTERFACE_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif
Binary file not shown.
@@ -0,0 +1,135 @@
//Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#define APSTUDIO_HIDDEN_SYMBOLS
#include "windows.h"
#undef APSTUDIO_HIDDEN_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_DATASERVER ICON DISCARDABLE "Data Server.ICO"
IDI_SMALL ICON DISCARDABLE "SMALL.ICO"
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
IDC_DATASERVER MENU DISCARDABLE
BEGIN
POPUP "&File"
BEGIN
MENUITEM "E&xit", IDM_EXIT
END
POPUP "&Help"
BEGIN
MENUITEM "&About ...", IDM_ABOUT
END
END
/////////////////////////////////////////////////////////////////////////////
//
// Accelerator
//
IDC_DATASERVER ACCELERATORS MOVEABLE PURE
BEGIN
"?", IDM_ABOUT, ASCII, ALT
"/", IDM_ABOUT, ASCII, ALT
END
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_ABOUTBOX DIALOG DISCARDABLE 22, 17, 230, 75
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "About"
FONT 8, "System"
BEGIN
ICON IDI_DATASERVER,IDC_MYICON,14,9,16,16
LTEXT "Data Server Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX
LTEXT "Copyright (C) 2000",IDC_STATIC,49,20,119,8
DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP
END
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""resource.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDC_DATASERVER "DATASERVER"
IDS_APP_TITLE "Data Server"
IDS_HELLO "Hello World!"
END
#endif
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
@@ -0,0 +1,14 @@
[
uuid(FBEB9247-3DF4-43d3-A1D4-DB950D90C8D9),
version(1.0),
]
interface MW4DataServer
{
int StartRunID (void);
void RecordData ([in] int id,[in] int version,[in] double time, [in] int type,[in] int objectid,
[in] float posx,[in] float posy,[in] float posz,
[in] int int1,[in] int int2,[in] int int3,[in] int int4,
[in] float float1,[in] float float2,[in] float float3,[in] float float4,
[in,string] const char *p5);
void FinishRun ([in] int id);
}
@@ -0,0 +1,56 @@
========================================================================
WIN32 APPLICATION : Data Server
========================================================================
AppWizard has created this Data Server application for you.
This file contains a summary of what you will find in each of the files that
make up your Data Server application.
Data Server.cpp
This is the main application source file.
Data Server.dsp
This file (the project file) contains information at the project level and
is used to build a single project or subproject. Other users can share the
project (.dsp) file, but they should export the makefiles locally.
/////////////////////////////////////////////////////////////////////////////
AppWizard has created the following resources:
Data Server.rc
This is a listing of all of the Microsoft Windows resources that the
program uses. It includes the icons, bitmaps, and cursors that are stored
in the RES subdirectory. This file can be directly edited in Microsoft
Visual C++.
res\Data Server.ico
This is an icon file, which is used as the application's icon (32x32).
This icon is included by the main resource file Data Server.rc.
small.ico
%%This is an icon file, which contains a smaller version (16x16)
of the application's icon. This icon is included by the main resource
file Data Server.rc.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named Data Server.pch and a precompiled types file named StdAfx.obj.
Resource.h
This is the standard header file, which defines new resource IDs.
Microsoft Visual C++ reads and updates this file.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" to indicate parts of the source code you
should add to or customize.
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,34 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
#define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#pragma warning (disable : 4786)
//#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
// C RunTime Header Files
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
// Local Header Files
#include "data server.hpp"
// TODO: reference additional headers your program requires here
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
@@ -0,0 +1,123 @@
#pragma warning (disable : 4786)
#include "stdafx.h"
#include "data server.hpp"
#include "data server.h"
#include <vector>
using namespace std;
CRITICAL_SECTION g_CritSection;
void __RPC_FAR * __RPC_USER midl_user_allocate(size_t len)
{
return(malloc(len));
}
void __RPC_USER midl_user_free(void __RPC_FAR * ptr)
{
free(ptr);
}
int StartRunID (void)
{
EnterCriticalSection (&g_CritSection);
int cur;
char string[255];
cur = -1;
do
{
cur++;
sprintf (string,"mw4run%d.data",cur);
} while (FileExists (string) );
HANDLE file;
file = NewFile (string);
CloseFile (file);
LeaveCriticalSection (&g_CritSection);
return cur;
}
void RecordData (int id,int version,double time,int type,int objectid,
float posx,float posy,float posz,
int int1,int int2,int int3,int int4,
float float1,float float2,float float3,float float4,
const unsigned char __RPC_FAR *str)
{
g_DataList[id].push_back (CDataEntry (id,version,type,time,objectid,posx,posy,posz,int1,int2,int3,int4,float1,float2,float3,float4,(const char *) str));
}
void FinishRun (int id)
{
HANDLE file;
char string[255];
std::map<int, std::vector<CDataEntry> >::iterator iter;
sprintf (string,"mw4run%d.data",id);
iter = g_DataList.find (id);
if (iter == g_DataList.end ())
{
DeleteFile (string);
return;
}
file = NewFile (string);
if (file == INVALID_HANDLE_VALUE)
return;
DumpData (file,g_DataList[id]);
CloseFile (file);
}
bool InitRPC (void)
{
InitializeCriticalSection (&g_CritSection);
RPC_STATUS status;
unsigned char * pszProtocolSequence1 = (unsigned char *) "ncacn_ip_tcp";
unsigned char * pszEndpoint1 = (unsigned char *) "1405";
unsigned char * pszProtocolSequence2 = (unsigned char *) "ncalrpc";
unsigned char * pszEndpoint2 = (unsigned char *) "MW4DataServer";
unsigned char * pszSecurity = (unsigned char *) NULL;
unsigned int cMinCalls = 1;
unsigned int cMaxCalls = 50;
unsigned int fDontWait = 1;
// status = RpcServerUseAllProtseqs (cMaxCalls,pszSecurity);
status = RpcServerUseProtseqEp(pszProtocolSequence1,cMaxCalls,pszEndpoint1,pszSecurity); // Security descriptor
if (status)
return false;
status = RpcServerUseProtseqEp(pszProtocolSequence2,cMaxCalls,pszEndpoint2,pszSecurity); // Security descriptor
if (status)
return false;
RPC_BINDING_VECTOR *inq;
status = RpcServerInqBindings (&inq);
status = RpcServerRegisterIf(MW4DataServer_ServerIfHandle, // interface to register
NULL, // MgrTypeUuid
NULL); // MgrEpv; null means use default
if (status)
return false;
status = RpcServerListen(cMinCalls,cMaxCalls,fDontWait);
if (status)
return false;
return true;
}
bool CloseRPC (void)
{
RPC_STATUS status;
status = RpcMgmtStopServerListening(NULL);
if (!status)
{
status = RpcServerUnregisterIf(NULL, NULL, FALSE);
}
DeleteCriticalSection (&g_CritSection);
return true;
}
@@ -0,0 +1,5 @@
[implicit_handle(handle_t data_server_IfHandle)]
interface MW4DataServer
{
}
@@ -0,0 +1,13 @@
#pragma once
#include "fileio.hpp"
#include "data.hpp"
#include <vector>
#include <map>
bool InitRPC (void);
bool CloseRPC (void);
extern std::map<int, std::vector<CDataEntry> > g_DataList;
@@ -0,0 +1,345 @@
/* this ALWAYS GENERATED file contains the RPC client stubs */
/* File created by MIDL compiler version 5.01.0164 */
/* at Tue Mar 14 10:53:09 2000
*/
/* Compiler settings for data server.idl:
Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext, oldnames
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
#include <string.h>
#if defined( _ALPHA_ )
#include <stdarg.h>
#endif
#include "data server.h"
#define TYPE_FORMAT_STRING_SIZE 7
#define PROC_FORMAT_STRING_SIZE 45
typedef struct _MIDL_TYPE_FORMAT_STRING
{
short Pad;
unsigned char Format[ TYPE_FORMAT_STRING_SIZE ];
} MIDL_TYPE_FORMAT_STRING;
typedef struct _MIDL_PROC_FORMAT_STRING
{
short Pad;
unsigned char Format[ PROC_FORMAT_STRING_SIZE ];
} MIDL_PROC_FORMAT_STRING;
extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
/* Standard interface: MW4DataServer, ver. 1.0,
GUID={0xFBEB9247,0x3DF4,0x43d3,{0xA1,0xD4,0xDB,0x95,0x0D,0x90,0xC8,0xD9}} */
handle_t data_server_IfHandle;
static const RPC_CLIENT_INTERFACE MW4DataServer___RpcClientInterface =
{
sizeof(RPC_CLIENT_INTERFACE),
{{0xFBEB9247,0x3DF4,0x43d3,{0xA1,0xD4,0xDB,0x95,0x0D,0x90,0xC8,0xD9}},{1,0}},
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
0,
0,
0,
0,
0,
0
};
RPC_IF_HANDLE MW4DataServer_ClientIfHandle = (RPC_IF_HANDLE)& MW4DataServer___RpcClientInterface;
extern const MIDL_STUB_DESC MW4DataServer_StubDesc;
static RPC_BINDING_HANDLE MW4DataServer__MIDL_AutoBindHandle;
int StartRunID( void)
{
RPC_BINDING_HANDLE _Handle = 0;
int _RetVal;
RPC_MESSAGE _RpcMessage;
MIDL_STUB_MESSAGE _StubMsg;
RpcTryFinally
{
NdrClientInitializeNew(
( PRPC_MESSAGE )&_RpcMessage,
( PMIDL_STUB_MESSAGE )&_StubMsg,
( PMIDL_STUB_DESC )&MW4DataServer_StubDesc,
0);
_Handle = data_server_IfHandle;
_StubMsg.BufferLength = 0U;
NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
_RetVal = *(( int __RPC_FAR * )_StubMsg.Buffer)++;
}
RpcFinally
{
NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
}
RpcEndFinally
return _RetVal;
}
void RecordData(
/* [in] */ int id,
/* [in] */ int version,
/* [in] */ double time,
/* [in] */ int type,
/* [in] */ int objectid,
/* [in] */ float posx,
/* [in] */ float posy,
/* [in] */ float posz,
/* [in] */ int int1,
/* [in] */ int int2,
/* [in] */ int int3,
/* [in] */ int int4,
/* [in] */ float float1,
/* [in] */ float float2,
/* [in] */ float float3,
/* [in] */ float float4,
/* [string][in] */ const unsigned char __RPC_FAR *p5)
{
RPC_BINDING_HANDLE _Handle = 0;
RPC_MESSAGE _RpcMessage;
MIDL_STUB_MESSAGE _StubMsg;
if(!p5)
{
RpcRaiseException(RPC_X_NULL_REF_POINTER);
}
RpcTryFinally
{
NdrClientInitializeNew(
( PRPC_MESSAGE )&_RpcMessage,
( PMIDL_STUB_MESSAGE )&_StubMsg,
( PMIDL_STUB_DESC )&MW4DataServer_StubDesc,
1);
_Handle = data_server_IfHandle;
_StubMsg.BufferLength = 4U + 4U + 8U + 4U + 4U + 4U + 4U + 4U + 4U + 4U + 4U + 4U + 4U + 4U + 4U + 4U + 12U;
NdrConformantStringBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
(unsigned char __RPC_FAR *)p5,
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[4] );
NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
*(( int __RPC_FAR * )_StubMsg.Buffer)++ = id;
*(( int __RPC_FAR * )_StubMsg.Buffer)++ = version;
*(( double __RPC_FAR * )_StubMsg.Buffer)++ = time;
*(( int __RPC_FAR * )_StubMsg.Buffer)++ = type;
*(( int __RPC_FAR * )_StubMsg.Buffer)++ = objectid;
*(( float __RPC_FAR * )_StubMsg.Buffer)++ = posx;
*(( float __RPC_FAR * )_StubMsg.Buffer)++ = posy;
*(( float __RPC_FAR * )_StubMsg.Buffer)++ = posz;
*(( int __RPC_FAR * )_StubMsg.Buffer)++ = int1;
*(( int __RPC_FAR * )_StubMsg.Buffer)++ = int2;
*(( int __RPC_FAR * )_StubMsg.Buffer)++ = int3;
*(( int __RPC_FAR * )_StubMsg.Buffer)++ = int4;
*(( float __RPC_FAR * )_StubMsg.Buffer)++ = float1;
*(( float __RPC_FAR * )_StubMsg.Buffer)++ = float2;
*(( float __RPC_FAR * )_StubMsg.Buffer)++ = float3;
*(( float __RPC_FAR * )_StubMsg.Buffer)++ = float4;
NdrConformantStringMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
(unsigned char __RPC_FAR *)p5,
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[4] );
NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
}
RpcFinally
{
NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
}
RpcEndFinally
}
void FinishRun(
/* [in] */ int id)
{
RPC_BINDING_HANDLE _Handle = 0;
RPC_MESSAGE _RpcMessage;
MIDL_STUB_MESSAGE _StubMsg;
RpcTryFinally
{
NdrClientInitializeNew(
( PRPC_MESSAGE )&_RpcMessage,
( PMIDL_STUB_MESSAGE )&_StubMsg,
( PMIDL_STUB_DESC )&MW4DataServer_StubDesc,
2);
_Handle = data_server_IfHandle;
_StubMsg.BufferLength = 4U;
NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
*(( int __RPC_FAR * )_StubMsg.Buffer)++ = id;
NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
}
RpcFinally
{
NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
}
RpcEndFinally
}
static const MIDL_STUB_DESC MW4DataServer_StubDesc =
{
(void __RPC_FAR *)& MW4DataServer___RpcClientInterface,
MIDL_user_allocate,
MIDL_user_free,
&data_server_IfHandle,
0,
0,
0,
0,
__MIDL_TypeFormatString.Format,
1, /* -error bounds_check flag */
0x10001, /* Ndr library version */
0,
0x50100a4, /* MIDL Version 5.1.164 */
0,
0,
0, /* notify & notify_flag routine table */
1, /* Flags */
0, /* Reserved3 */
0, /* Reserved4 */
0 /* Reserved5 */
};
#if !defined(__RPC_WIN32__)
#error Invalid build platform for this stub.
#endif
static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
{
0,
{
0x53, /* FC_RETURN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 2 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 4 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 6 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xc, /* FC_DOUBLE */
/* 8 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 10 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 12 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xa, /* FC_FLOAT */
/* 14 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xa, /* FC_FLOAT */
/* 16 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xa, /* FC_FLOAT */
/* 18 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 20 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 22 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 24 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 26 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xa, /* FC_FLOAT */
/* 28 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xa, /* FC_FLOAT */
/* 30 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xa, /* FC_FLOAT */
/* 32 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xa, /* FC_FLOAT */
/* 34 */
0x4d, /* FC_IN_PARAM */
#ifndef _ALPHA_
0x1, /* x86, MIPS & PPC Stack size = 1 */
#else
0x2, /* Alpha Stack size = 2 */
#endif
/* 36 */ NdrFcShort( 0x2 ), /* Type Offset=2 */
/* 38 */ 0x5b, /* FC_END */
0x5c, /* FC_PAD */
/* 40 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 42 */ 0x5b, /* FC_END */
0x5c, /* FC_PAD */
0x0
}
};
static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
{
0,
{
NdrFcShort( 0x0 ), /* 0 */
/* 2 */
0x11, 0x8, /* FC_RP [simple_pointer] */
/* 4 */
0x22, /* FC_C_CSTRING */
0x5c, /* FC_PAD */
0x0
}
};
@@ -0,0 +1,381 @@
/* this ALWAYS GENERATED file contains the RPC server stubs */
/* File created by MIDL compiler version 5.01.0164 */
/* at Tue Mar 14 10:53:09 2000
*/
/* Compiler settings for data server.idl:
Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext, oldnames
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
#include <string.h>
#include "data server.h"
#define TYPE_FORMAT_STRING_SIZE 7
#define PROC_FORMAT_STRING_SIZE 45
typedef struct _MIDL_TYPE_FORMAT_STRING
{
short Pad;
unsigned char Format[ TYPE_FORMAT_STRING_SIZE ];
} MIDL_TYPE_FORMAT_STRING;
typedef struct _MIDL_PROC_FORMAT_STRING
{
short Pad;
unsigned char Format[ PROC_FORMAT_STRING_SIZE ];
} MIDL_PROC_FORMAT_STRING;
extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
/* Standard interface: MW4DataServer, ver. 1.0,
GUID={0xFBEB9247,0x3DF4,0x43d3,{0xA1,0xD4,0xDB,0x95,0x0D,0x90,0xC8,0xD9}} */
extern RPC_DISPATCH_TABLE MW4DataServer_DispatchTable;
static const RPC_SERVER_INTERFACE MW4DataServer___RpcServerInterface =
{
sizeof(RPC_SERVER_INTERFACE),
{{0xFBEB9247,0x3DF4,0x43d3,{0xA1,0xD4,0xDB,0x95,0x0D,0x90,0xC8,0xD9}},{1,0}},
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
&MW4DataServer_DispatchTable,
0,
0,
0,
0,
0
};
RPC_IF_HANDLE MW4DataServer_ServerIfHandle = (RPC_IF_HANDLE)& MW4DataServer___RpcServerInterface;
extern const MIDL_STUB_DESC MW4DataServer_StubDesc;
void __RPC_STUB
MW4DataServer_StartRunID(
PRPC_MESSAGE _pRpcMessage )
{
int _RetVal;
MIDL_STUB_MESSAGE _StubMsg;
RPC_STATUS _Status;
((void)(_Status));
NdrServerInitializeNew(
_pRpcMessage,
&_StubMsg,
&MW4DataServer_StubDesc);
RpcTryFinally
{
RpcTryExcept
{
if(_StubMsg.Buffer > _StubMsg.BufferEnd)
{
RpcRaiseException(RPC_X_BAD_STUB_DATA);
}
}
RpcExcept( RPC_BAD_STUB_DATA_EXCEPTION_FILTER )
{
RpcRaiseException(RPC_X_BAD_STUB_DATA);
}
RpcEndExcept
_RetVal = StartRunID();
_StubMsg.BufferLength = 4U;
_pRpcMessage->BufferLength = _StubMsg.BufferLength;
_Status = I_RpcGetBuffer( _pRpcMessage );
if ( _Status )
RpcRaiseException( _Status );
_StubMsg.Buffer = (unsigned char __RPC_FAR *) _pRpcMessage->Buffer;
*(( int __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
}
RpcFinally
{
}
RpcEndFinally
_pRpcMessage->BufferLength =
(unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
}
void __RPC_STUB
MW4DataServer_RecordData(
PRPC_MESSAGE _pRpcMessage )
{
MIDL_STUB_MESSAGE _StubMsg;
float float1;
float float2;
float float3;
float float4;
int id;
int int1;
int int2;
int int3;
int int4;
int objectid;
const unsigned char __RPC_FAR *p5;
float posx;
float posy;
float posz;
double time;
int type;
int version;
RPC_STATUS _Status;
((void)(_Status));
NdrServerInitializeNew(
_pRpcMessage,
&_StubMsg,
&MW4DataServer_StubDesc);
( unsigned char __RPC_FAR * )p5 = 0;
RpcTryFinally
{
RpcTryExcept
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[2] );
id = *(( int __RPC_FAR * )_StubMsg.Buffer)++;
version = *(( int __RPC_FAR * )_StubMsg.Buffer)++;
time = *(( double __RPC_FAR * )_StubMsg.Buffer)++;
type = *(( int __RPC_FAR * )_StubMsg.Buffer)++;
objectid = *(( int __RPC_FAR * )_StubMsg.Buffer)++;
posx = *(( float __RPC_FAR * )_StubMsg.Buffer)++;
posy = *(( float __RPC_FAR * )_StubMsg.Buffer)++;
posz = *(( float __RPC_FAR * )_StubMsg.Buffer)++;
int1 = *(( int __RPC_FAR * )_StubMsg.Buffer)++;
int2 = *(( int __RPC_FAR * )_StubMsg.Buffer)++;
int3 = *(( int __RPC_FAR * )_StubMsg.Buffer)++;
int4 = *(( int __RPC_FAR * )_StubMsg.Buffer)++;
float1 = *(( float __RPC_FAR * )_StubMsg.Buffer)++;
float2 = *(( float __RPC_FAR * )_StubMsg.Buffer)++;
float3 = *(( float __RPC_FAR * )_StubMsg.Buffer)++;
float4 = *(( float __RPC_FAR * )_StubMsg.Buffer)++;
NdrConformantStringUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
(unsigned char __RPC_FAR * __RPC_FAR *)&p5,
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[4],
(unsigned char)0 );
if(_StubMsg.Buffer > _StubMsg.BufferEnd)
{
RpcRaiseException(RPC_X_BAD_STUB_DATA);
}
}
RpcExcept( RPC_BAD_STUB_DATA_EXCEPTION_FILTER )
{
RpcRaiseException(RPC_X_BAD_STUB_DATA);
}
RpcEndExcept
RecordData(
id,
version,
time,
type,
objectid,
posx,
posy,
posz,
int1,
int2,
int3,
int4,
float1,
float2,
float3,
float4,
p5);
}
RpcFinally
{
}
RpcEndFinally
_pRpcMessage->BufferLength =
(unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
}
void __RPC_STUB
MW4DataServer_FinishRun(
PRPC_MESSAGE _pRpcMessage )
{
MIDL_STUB_MESSAGE _StubMsg;
int id;
RPC_STATUS _Status;
((void)(_Status));
NdrServerInitializeNew(
_pRpcMessage,
&_StubMsg,
&MW4DataServer_StubDesc);
RpcTryFinally
{
RpcTryExcept
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[40] );
id = *(( int __RPC_FAR * )_StubMsg.Buffer)++;
if(_StubMsg.Buffer > _StubMsg.BufferEnd)
{
RpcRaiseException(RPC_X_BAD_STUB_DATA);
}
}
RpcExcept( RPC_BAD_STUB_DATA_EXCEPTION_FILTER )
{
RpcRaiseException(RPC_X_BAD_STUB_DATA);
}
RpcEndExcept
FinishRun(id);
}
RpcFinally
{
}
RpcEndFinally
_pRpcMessage->BufferLength =
(unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
}
static const MIDL_STUB_DESC MW4DataServer_StubDesc =
{
(void __RPC_FAR *)& MW4DataServer___RpcServerInterface,
MIDL_user_allocate,
MIDL_user_free,
0,
0,
0,
0,
0,
__MIDL_TypeFormatString.Format,
1, /* -error bounds_check flag */
0x10001, /* Ndr library version */
0,
0x50100a4, /* MIDL Version 5.1.164 */
0,
0,
0, /* notify & notify_flag routine table */
1, /* Flags */
0, /* Reserved3 */
0, /* Reserved4 */
0 /* Reserved5 */
};
static RPC_DISPATCH_FUNCTION MW4DataServer_table[] =
{
MW4DataServer_StartRunID,
MW4DataServer_RecordData,
MW4DataServer_FinishRun,
0
};
RPC_DISPATCH_TABLE MW4DataServer_DispatchTable =
{
3,
MW4DataServer_table
};
#if !defined(__RPC_WIN32__)
#error Invalid build platform for this stub.
#endif
static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
{
0,
{
0x53, /* FC_RETURN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 2 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 4 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 6 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xc, /* FC_DOUBLE */
/* 8 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 10 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 12 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xa, /* FC_FLOAT */
/* 14 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xa, /* FC_FLOAT */
/* 16 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xa, /* FC_FLOAT */
/* 18 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 20 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 22 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 24 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 26 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xa, /* FC_FLOAT */
/* 28 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xa, /* FC_FLOAT */
/* 30 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xa, /* FC_FLOAT */
/* 32 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0xa, /* FC_FLOAT */
/* 34 */
0x4d, /* FC_IN_PARAM */
#ifndef _ALPHA_
0x1, /* x86, MIPS & PPC Stack size = 1 */
#else
0x2, /* Alpha Stack size = 2 */
#endif
/* 36 */ NdrFcShort( 0x2 ), /* Type Offset=2 */
/* 38 */ 0x5b, /* FC_END */
0x5c, /* FC_PAD */
/* 40 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
0x8, /* FC_LONG */
/* 42 */ 0x5b, /* FC_END */
0x5c, /* FC_PAD */
0x0
}
};
static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
{
0,
{
NdrFcShort( 0x0 ), /* 0 */
/* 2 */
0x11, 0x8, /* FC_RP [simple_pointer] */
/* 4 */
0x22, /* FC_C_CSTRING */
0x5c, /* FC_PAD */
0x0
}
};
@@ -0,0 +1,137 @@
#pragma warning (disable : 4786)
#include "stdafx.h"
#include "data.hpp"
#include <cstdio>
#include <vector>
using namespace std;
CDataEntry::CDataEntry (int runnumber,int version,int type,double time)
{
m_RunNumber = runnumber;
m_DataType = type;
m_Version = version;
m_Time = time;
m_ObjectID = 0;
m_PosX = 0;
m_PosY = 0;
m_PosZ = 0;
m_Int1 = 0;
m_Int2 = 0;
m_Int3 = 0;
m_Int4 = 0;
m_Float1 = 0;
m_Float2 = 0;
m_Float3 = 0;
m_Float4 = 0;
m_String = NULL;
}
CDataEntry::CDataEntry (int run,int version,int type,double time,int objid,float posx,float posy,float posz,int int1,int int2,int int3,int int4,float float1,float float2,float float3,float float4,const char *str)
{
m_RunNumber = run;
m_DataType = type;
m_Version = version;
m_Time = time;
m_ObjectID = objid;
m_PosX = posx;
m_PosY = posy;
m_PosZ = posz;
m_Int1 = int1;
m_Int2 = int2;
m_Int3 = int3;
m_Int4 = int4;
m_Float1 = float1;
m_Float2 = float2;
m_Float3 = float3;
m_Float4 = float4;
m_String = NULL;
if (str)
{
m_String = new char[strlen (str)+1];
strcpy (m_String,str);
}
}
CDataEntry::CDataEntry (const CDataEntry& p1)
{
m_RunNumber = p1.m_RunNumber;
m_DataType = p1.m_DataType;
m_Version = p1.m_Version;
m_Time = p1.m_Time;
m_ObjectID = p1.m_ObjectID;
m_PosX = p1.m_PosX;
m_PosY = p1.m_PosY;
m_PosZ = p1.m_PosZ;
m_Int1 = p1.m_Int1;
m_Int2 = p1.m_Int2;
m_Int3 = p1.m_Int3;
m_Int4 = p1.m_Int4;
m_Float1 = p1.m_Float1;
m_Float2 = p1.m_Float2;
m_Float3 = p1.m_Float3;
m_Float4 = p1.m_Float4;
if (p1.m_String)
{
m_String = new char[strlen(p1.m_String)+1];
strcpy (m_String,p1.m_String);
}
else
m_String = NULL;
}
CDataEntry::~CDataEntry (void)
{
delete[] m_String;
}
CDataEntry &CDataEntry::operator= (const CDataEntry &p1)
{
delete[] m_String;
m_RunNumber = p1.m_RunNumber;
m_DataType = p1.m_DataType;
m_Version = p1.m_Version;
m_Time = p1.m_Time;
m_ObjectID = p1.m_ObjectID;
m_PosX = p1.m_PosX;
m_PosY = p1.m_PosY;
m_PosZ = p1.m_PosZ;
m_Int1 = p1.m_Int1;
m_Int2 = p1.m_Int2;
m_Int3 = p1.m_Int3;
m_Int4 = p1.m_Int4;
m_Float1 = p1.m_Float1;
m_Float2 = p1.m_Float2;
m_Float3 = p1.m_Float3;
m_Float4 = p1.m_Float4;
if (p1.m_String)
{
m_String = new char[strlen(p1.m_String)+1];
strcpy (m_String,p1.m_String);
}
else
m_String = NULL;
return *this;
}
bool CDataEntry::DumpData (HANDLE file) const
{
char *string;
DWORD written;
if (m_String)
string = new char[strlen (m_String) + 128];
else
string = new char[128];
sprintf (string,"%d,%d,%d,%f,%d,%f,%f,%f,%d,%d,%d,%d,%f,%f,%f,%f,\"%s\"\n", m_RunNumber,m_DataType,m_Version,m_Time,m_ObjectID,
m_PosX,m_PosY,m_PosZ,m_Int1,m_Int2,m_Int3,m_Int4,m_Float1,m_Float2,m_Float3,m_Float4,m_String);
WriteFile (file,string,strlen (string),&written,NULL);
delete[] string;
if (written != strlen (string))
return false;
return true;
}
@@ -0,0 +1,29 @@
#pragma once
class CDataEntry
{
protected:
int m_RunNumber;
int m_DataType;
int m_Version;
int m_ObjectID;
double m_Time;
float m_PosX,m_PosY,m_PosZ;
int m_Int1,m_Int2,m_Int3,m_Int4;
float m_Float1,m_Float2,m_Float3,m_Float4;
char *m_String;
public:
CDataEntry (int run,int version,int type,double time);
CDataEntry (int run,int version,int type,double time,int objid,float posx,float posy,float posz,int int1,int int2,int int3,int int4,float float1,float float2,float float3,float float4,const char *str);
CDataEntry (const CDataEntry& p1);
~CDataEntry (void);
CDataEntry &operator= (const CDataEntry &p1);
bool DumpData (HANDLE file) const;
int RunNum (void) const
{ return m_RunNumber; }
};
@@ -0,0 +1,47 @@
#pragma warning (disable : 4786)
#include "stdafx.h"
#include "fileio.hpp"
bool FileExists (const char *file)
{
DWORD toret;
toret = GetFileAttributes (file);
if (toret == -1)
{
return false;
}
return true;
}
HANDLE OpenFile (const char *file)
{
HANDLE toret;
toret = CreateFile (file,GENERIC_ALL,FILE_SHARE_READ,NULL,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL|FILE_FLAG_SEQUENTIAL_SCAN,NULL);
return toret;
}
HANDLE NewFile (const char *file)
{
HANDLE toret;
toret = CreateFile (file,GENERIC_ALL,FILE_SHARE_READ,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL|FILE_FLAG_SEQUENTIAL_SCAN,NULL);
return toret;
}
bool DumpData (HANDLE file,const std::vector<CDataEntry>& data)
{
std::vector<CDataEntry>::const_iterator iter;
for (iter = data.begin ();iter != data.end ();iter++)
{
iter->DumpData (file);
}
return false;
}
bool CloseFile (HANDLE file)
{
CloseHandle (file);
return false;
}
@@ -0,0 +1,11 @@
#pragma once
#include <vector>
#include "data.hpp"
bool FileExists (const char *file);
HANDLE OpenFile (const char *file);
HANDLE NewFile (const char *file);
bool DumpData (HANDLE file,const std::vector<CDataEntry>& data);
bool CloseFile (HANDLE file);
@@ -0,0 +1,27 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by DATA SERVER.RC
//
#define IDR_MAINFRAME 128
#define IDD_DATASERVER_DIALOG 102
#define IDD_ABOUTBOX 103
#define IDS_APP_TITLE 103
#define IDM_ABOUT 104
#define IDM_EXIT 105
#define IDS_HELLO 106
#define IDI_DATASERVER 107
#define IDI_SMALL 108
#define IDC_DATASERVER 109
#define IDC_MYICON 2
#define IDC_STATIC -1
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 110
#endif
#endif
Binary file not shown.