Hi IcyDee
Here's a thought just to see if the info that you want to break at WinMain is getting across to Softice properly.
The nmtrans.dll function DevIO_SetWLDRBreak is used to communicate to the winice vxd via a DeviceIOControl call that the user wants to break at the program start. The DevIO_ConnectToSoftICE function opens the vxd in the usual way with CreateFileA and returns a valid handle. Then DeviceIOControl is called, pushing the dwIoControlCode (9C40601C) for the proper function within the winice vxd to set the "Stop at WinMain" flag.
I thought you could start to scope out the problem by checking these 2 calls and see if they are returning proper values. Load nmtrans.dll as a module in winice.dat (EXP=C:\SOFTICE\NMTRANS.DLL) and set a BPX on DevIO_SetWLDRBreak. Then trace through and check the return values. Note that you may not be able to step *over* the DeviceIOControl call without the rest of the program executing, but you can set a bp on the MOV [EBP-20],EAX immediately afterwards.
DevIO_ConnectToSoftICE should return a valid handle to the winice vxd
DeviceIOControl should return 1 in EAX if the flag to break at WinMain was successfully set in winice.
Code:
nmtrans!DevIO_SetWLDRBreak
:10019A40 55 PUSH EBP
...
:10019A84 744B JZ 10019AD1
:10019A86 E855F9FFFF CALL nmtrans!DevIO_ConnectToSoftICE
; returns valid handle
...
:10019ABC 52 PUSH EDX
:10019ABD 681C60409C PUSH 9C40601C
:10019AC2 56 PUSH ESI
:10019AC3 FF158C100510 CALL [KERNEL32!DeviceIoControl]
:10019AC9 8945E0 MOV [EBP-20],EAX ; set bpx here
If this checks out OK then I guess you've got some weird Win2000 thing going on. You can always try editing in a CC at the OEP and then replace the opcodes. Hope this helps.
Regards,
Kayaker