Inlineexample.h, Inlineexample.cpp, Run dumpbin.exe – Rockwell Automation 1789-L10_L30_L60 SoftLogix 5800 System User Manual User Manual

Page 145: Inlineexample.h inlineexample.cpp run dumpbin.exe

Advertising
background image

Rockwell Automation Publication 1789-UM002J-EN-P - December 2012

145

Develop External Routines

Chapter 7

Visual Studio software includes a tool (dumpbin.exe) that you can use to obtain
the C++ decorated name from your DLL file. The dumpbin.exe tool is installed
as part of Visual Studio product. The examples below show how to use this tool.

InlineExample.h

// Exported Functions:
__declspec(dllimport) int SumArray(EXT_ROUTINE_CONTROL* pERCtrl,

int Val[]);

InlineExample.cpp

__declspec(dllexport) int SumArray(EXT_ROUTINE_CONTROL* pERCtrl,

int Val[])

{

// body of function.

Run dumpbin.exe

Run dumpbin.exe with the /exports flag set to display the decorated names for all
of the exported routines. The following is the output running dumpbin /exports
on a C++ DLL.

For example, entering this command:

Dumpbin.exe /exports InlineExample.dll

displays this output information.

Microsoft (R) COFF Binary File Dumper Version 6.20.8700
Copyright (C) Microsoft Corp 1992-2000. All rights reserved.

Dump of file InlineExample.dll

File Type: DLL

Section contains the following exports for InlineExample.dll

0 characteristics
3BA9F7A0 time date stamp Thu Sep 20 10:05:20 2001
0.00 version
1 ordinal base
1 number of functions
1 number of names

ordinal hint RVA name

1 0 0000100A ?SumArray@@YAHPAUEXT_ROUTINE_CONTROL@@QAH@Z

Summary

4000 .data
1000 .idata
2000 .rdata
2000 .reloc
1000 .rsrc
28000 .text

Advertising