Skip to content

Simple stub

Yaroslav Kibysh edited this page Jul 6, 2019 · 1 revision

Meaning

A simple stub creates a function that has no arguments and returns FALSE. See definitions and examples below.

Stub(Function) // macros

Used to declare stubs.

Unimplemented(LPCWSTR Text) // function used by Stub(Function)

Used to handle unimplemented functions. Currently returns FALSE and displays Text in message box.

Definition:

#define Stub(Function) int Function() { return Unimplemented(L"Function " #Function " is not implemented yet."); }

Usage example:

Stub(__security_gen_cookie2);

Expands into:

int __security_gen_cookie2()
{
    return Unimplemented(L"Function __security_gen_cookie2 is not implemented yet.");
}

Returns FALSE