本文整理汇总了C#中IPlatform.FindMainProcedure方法的典型用法代码示例。如果您正苦于以下问题:C# IPlatform.FindMainProcedure方法的具体用法?C# IPlatform.FindMainProcedure怎么用?C# IPlatform.FindMainProcedure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPlatform
的用法示例。
在下文中一共展示了IPlatform.FindMainProcedure方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateMainEntryPoint
public ImageSymbol CreateMainEntryPoint(bool isDll, Address addrEp, IPlatform platform)
{
var s = platform.FindMainProcedure(this.program, addrEp);
if (s != null)
return s;
string name = null;
SerializedSignature ssig = null;
Func<string, string, Argument_v1> Arg =
(n, t) => new Argument_v1
{
Name = n,
Type = new TypeReference_v1 { TypeName = t }
};
if (isDll)
{
name = "DllMain"; //$TODO: ensure users can override this name
ssig = new SerializedSignature
{
Convention = "stdapi",
Arguments = new Argument_v1[]
{
Arg("hModule", "HANDLE"),
Arg("dwReason", "DWORD"),
Arg("lpReserved", "LPVOID")
},
ReturnValue = Arg(null, "BOOL")
};
}
else
{
name = "Win32CrtStartup";
ssig = new SerializedSignature
{
Convention = "__cdecl",
ReturnValue = Arg(null, "DWORD")
};
}
return new ImageSymbol(addrEp)
{
Name = name,
ProcessorState = arch.CreateProcessorState(),
Signature = ssig,
Type = SymbolType.Procedure
};
}