Geant4-11
Data Structures | Namespaces | Macros | Typedefs | Enumerations | Functions
genwindef.cc File Reference
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <assert.h>
#include <windows.h>

Go to the source code of this file.

Data Structures

class  CLibSymbolInfo
 
class  MEMORY_MAPPED_FILE
 

Namespaces

namespace  windef
 

Macros

#define AFX_LIBSYMBOLINFO_H__1A7003B4_BA53_11D1_AE46_1CFB51000000__INCLUDED_
 
#define MakePtr(cast, ptr, addValue)   (cast)( (DWORD_PTR)(ptr) + (DWORD_PTR)(addValue))
 

Typedefs

typedef MEMORY_MAPPED_FILEPMEMORY_MAPPED_FILE
 

Enumerations

enum  errMMF { errMMF_NoError , errMMF_FileOpen , errMMF_FileMapping , errMMF_MapView }
 

Functions

int main (int argc, char **argv)
 
void windef::usage ()
 

Macro Definition Documentation

◆ AFX_LIBSYMBOLINFO_H__1A7003B4_BA53_11D1_AE46_1CFB51000000__INCLUDED_

#define AFX_LIBSYMBOLINFO_H__1A7003B4_BA53_11D1_AE46_1CFB51000000__INCLUDED_

Definition at line 45 of file genwindef.cc.

◆ MakePtr

#define MakePtr (   cast,
  ptr,
  addValue 
)    (cast)( (DWORD_PTR)(ptr) + (DWORD_PTR)(addValue))

Definition at line 105 of file genwindef.cc.

Typedef Documentation

◆ PMEMORY_MAPPED_FILE

Definition at line 99 of file genwindef.cc.

Enumeration Type Documentation

◆ errMMF

enum errMMF
Enumerator
errMMF_NoError 
errMMF_FileOpen 
errMMF_FileMapping 
errMMF_MapView 

Definition at line 76 of file genwindef.cc.

@ errMMF_NoError
Definition: genwindef.cc:76
@ errMMF_FileOpen
Definition: genwindef.cc:76
@ errMMF_FileMapping
Definition: genwindef.cc:77
@ errMMF_MapView
Definition: genwindef.cc:77

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 358 of file genwindef.cc.

360{
361 string outfile("exports.def");
362 string library("UnknownLib");
363 string objfiles;
364 bool debug(false);
365
366 int arg;
367 if (argc < 3) windef::usage();
368 arg = 1;
369 while (argv[arg][0] == '-') {
370 if (strcmp(argv[arg], "--") == 0) {
372 }
373 else if (strcmp(argv[arg], "-l") == 0) {
374 arg++;
375 if (arg == argc) windef::usage();
376 library = argv[arg];
377 }
378 else if (strcmp(argv[arg], "-o") == 0) {
379 arg++;
380 if (arg == argc) windef::usage();
381 outfile = argv[arg];
382 }
383 arg++;
384 }
385 if (arg == argc) windef::usage();
386 for (arg; arg < argc; arg++) {
387 objfiles += argv[arg];
388 if( arg+1 < argc) objfiles += " ";
389 }
390
391 CLibSymbolInfo libsymbols;
392 ofstream out(outfile.c_str());
393 if(out.fail()) {
394 cerr << "windef: Error opening file " << outfile << endl;
395 return 1;
396 }
397 out << "LIBRARY " << library << endl;
398 out << "EXPORTS" << endl;
399
400 libsymbols.DumpSymbols(const_cast<char*>(objfiles.c_str()), out);
401
402 out.close();
403
404
405 return 0;
406}
BOOL DumpSymbols(LPTSTR lpszLibPathName, std::ostream &pFile)
Definition: genwindef.cc:130
def debug(dflag)
Definition: g4zmq.py:30
void usage()
Definition: genwindef.cc:350

References g4zmq::debug(), CLibSymbolInfo::DumpSymbols(), and windef::usage().