-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStructArrayFB1NativeMethods-cli.cpp
More file actions
33 lines (26 loc) · 1.04 KB
/
Copy pathStructArrayFB1NativeMethods-cli.cpp
File metadata and controls
33 lines (26 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// StructArrayFB1NativeMethods native assembly code template.
// PHOENIX CONTACT Software embedded CLR native assembly builder tool generated source file.
// use this file to implement your own native code
#include "eclr.h"
#include "DocuSharedNativeLibrary.h"
// class DocuSharedNativeLibrary.StructArrayFB1NativeMethods implementation
void __PInvoke__ DocuSharedNativeLibrary::StructArrayFB1NativeMethods::Reverse(DocuSharedNativeLibrary::InfoStructArray* p0, DocuSharedNativeLibrary::InfoStructArray* p1)
{
InfoStructArray* outArray = p0;
InfoStructArray* inArray = p1;
if (inArray == 0 || outArray == 0)
{
return;
}
InfoStruct* outData = &outArray->Anchor;
InfoStruct* inData = &inArray->Anchor;
Int32 size = inArray->GetUpperBound() - inArray->GetLowerBound() + 1;
for (int i = 0; i < size; i++)
{
InfoStruct* inInfo = &inData[i];
InfoStruct* outInfo = &outData[size - i - 1];
outInfo->VALUE_A = inInfo->VALUE_A;
outInfo->VALUE_B = inInfo->VALUE_B;
outInfo->TEXT.s.Assign(inInfo->TEXT.s.Begin(), inInfo->TEXT.s.GetLength());
}
}