我有一个我没有编写的Delphi DLL,但需要从C#ASP.NET 3.5应用程序调用.这是我从开发人员那里得到的函数定义:
function CreateCode(SerialID : String;
StartDateOfYear, YearOfStartDate, YearOfEndDate, DatePeriod : Word;
CodeType,RecordNumber,StartHour,EndHour : Byte) : PChar;
external 'CreateCodeDLL.dll';
Run Code Online (Sandbox Code Playgroud)
这是我的C#代码:
[DllImport( "CreateCodeDLL.dll",
CallingConvention = CallingConvention.StdCall,
CharSet=CharSet.Ansi)]
public static extern IntPtr CreateCode( string SerialID,
UInt16 StartDateOfYear,
UInt16 YearOfStartDate,
UInt16 YearOfEndDate,
UInt16 DatePeriod,
Byte CodeType,
Byte RecordNumber,
Byte StartHour,
Byte EndHour);
Run Code Online (Sandbox Code Playgroud)
最后,我对这个方法的调用:
//The Inputs
String serialID = "92F00000B4FBE";
UInt16 StartDateOfYear = 20;
UInt16 YearOfStartDate = 2009;
UInt16 YearOfEndDate = 2009;
UInt16 DatePeriod = 7;
Byte CodeType = 1;
Byte RecordNumber = …Run Code Online (Sandbox Code Playgroud) 我需要将我的服务器升级到PHP 5.3但是安装了Magento,我知道Magento与PHP 5.3不能很好地兼容.
我认为这些变化不会太广泛(从我读过的内容).但是,我想我会向SO人群开放.
有人做过这个吗?如果是这样,你做了好笔记吗?