To define an AddDevice callback function that is named MyAddDevice, you must first provide a function declaration that Static Driver Verifier (SDV) and other verification tools require, as follows:
DRIVER_ADD_DEVICE MyAddDevice;
Then, implement your callback function as follows:
NTSTATUS
MyAddDevice(
__in struct _DRIVER_OBJECT *DriverObject,
__in struct _DEVICE_OBJECT *PhysicalDeviceObject
)
{
// Function body
}