MCPcopy Index your code
hub / github.com/CCob/BOF.NET / invokeStaticMethod

Function invokeStaticMethod

bofs/bofnet_execute.cpp:131–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131VARIANT invokeStaticMethod(mscorlib::_Type* type, const BSTR method, int numArgs, ... ){
132
133 BOF_LOCAL(OleAut32, SafeArrayDestroy);
134
135 VARIANT result;
136 va_list argp;
137 va_start(argp, numArgs);
138 SAFEARRAY* saArgs = createVariantSafeArray(numArgs, argp);
139 va_end(argp);
140
141 HRESULT hr = type->InvokeMember_3(method, static_cast<mscorlib::BindingFlags>(mscorlib::BindingFlags_InvokeMethod | mscorlib::BindingFlags_Static | mscorlib::BindingFlags_Public),
142 nullptr, vtEmpty, saArgs, &result);
143
144 if(hr != S_OK){
145 log("Failed to invoke member 0x%x", hr);
146 }
147
148 SafeArrayDestroy(saArgs);
149 return result;
150}
151
152mscorlib::_Assembly* loadAssembly(mscorlib::_AppDomain* appDomain, const char* data, int len){
153

Callers 2

goFunction · 0.85

Calls 1

createVariantSafeArrayFunction · 0.85

Tested by

no test coverage detected