I am using Platform Builder 5.0 to build an image for my CEPC device,
the target device. I've included toolhelp.dll in the image. I've also
included the platform manager files needed for debugging over ethernet:
cemgrc.exe, tcpipc.dll and cetlkitl.dll. I use Platform Builder to
download the image to the CEPC. (I've worked around the problem of
cemgrc.exe exiting by writing a little app to ensure cemgrc.exe is
always running)
Then I go to eMbedded VC++ which is on a separate system. The program
I'm developing is a device driver. I can connect and download my DLL
to the target CE system OK over ethernet. I can use all the remote
tools OK, such as the process viewer and registry editor. But when I
select Attach to WCE Process, it tells me that "Toolhelp.dll cannot
be copied to the target device."
I've ensured that toolhelp.dll does exist on the target device. So I
don't know why eMbedded VC++ thinks it needs to download it. Although
the toolhelp.dll file is read-only on the target device---and it
won't seem to allow me to change that---I don't think that's the
problem. I got the same error even before I had built toolhelp.dll into
the CE image.
Any ideas on how I can fix this and attach to remote processes? I need
to attach to device.exe so I can debug my driver DLL as it gets loaded.
I did a search and only found one other person who had this same
problem and there were no replies. (
http://groups.google.com/group/microsoft.public.windowsce.embedded.vc/browse_frm/thread/13dcf7f410bdf2a4/005c6273f4b9d7b4?lnk=st&q=toolhelp.dll+cannot+be+copied+to+the+target+device&rnum=1#005c6273f4b9d7b4
)
Thanks.
On my emulator toolhelp.dll is present in the \windows directory, and
it isn't read-only. When I try to attach to a running process with eVC
I get a message about not being able to find commdlg.dll, but I can
cancel past it.
BTW, attach to running process is a better way to debug in eVC. I
wrote a post about it a little while back.
("http://groups.google.com/group/microsoft.public.windowsce.embedded.vc/msg/f557199d4b5b7eff?dmode=source)
Hope part of my rambling helped,
Dan.
Paul T.
"Dan McCarty" <dmcc...@gmail.com> wrote in message
news:1129907535.9...@z14g2000cwz.googlegroups.com...
I stand corrected. Thanks.
-Dan
I included toolhelp.dll by way of including Debugging Tools, as Paul
pointed out. Anyway, the problem persists whether the "Enable Kernel
Debugger" option is checked or not. I'm using a custom SDK. I've
built my own OSDesign based in Platform Builder based on one of the
templates. Then I exported the SDK and I use that in eMbedded VC++.
I can't use the emulator because I'm developing a client driver for
a USB device. I need to access the device.
My toolhelp.dll file is normally read-only and I can't change it. But
one time I did boot up and it was not read-only for some reason. So I
tried to delete it and I did. But I saw some strange behavior. The
toolhelp.dll file went to the recycle bin, but when I hit F5, it also
reappeared in the \Windows directory again. I'm new to WinCE so for
all I know maybe that's normal. Anyway, none of this seemed to help
at the time. Now, toolhelp.dll has gone back to being read-only and I
don't know why it was writeable that one time.
I started to think that toolhelp.dll is being held by the Platform
Builder debugger somehow. So far, the only way I've been able to run
my nk.bin image on the CEPC device is to boot the device with a floppy
and then download the image from Platform Builder. I figured that maybe
I need to get Platform Builder out of the picture. But simply stopping
the PB debugger and detaching didn't help. So then I wanted to try
booting directly to the nk.bin image, but I haven't been able to do
that yet. Since the image won't fit onto a floppy, I need to boot
either from a CD or hard disk. I tried making a bootable CD that's
equivalent to the floppy except that it includes nk.bin on it as well.
But for some reason, the nk.bin file is not visible when booting to
MSDOS 6.22 and I don't know why. And if I type "loadcepc /v
nk.bin" I get the error that the file is not found. I don't know if
booting from hard disk will be any better, but I'm going to try that
next, after I reformat from NTFS to FAT.
But it all seems rather odd. If eVC++ is going to try to download
toolhelp.dll, then why is it said that toolhelp.dll needs to be on the
target system? Or if it's already there, why is eVC++ trying to
download it?
I did come across the following note in a readme file for eVC++ SP2 QFE
5308:
---------------------------------------------------
Error Messages:
If you get the error message regarding 'File not found' or files
not copied, the possible reason is that a specific processor files are
not originally installed on the machine and hence could not be updated.
You will also get the File could not be copied error if a newer version
of the file already exists on your machine or the file was in use by
another process and could not be copied over.
----------------------------------------------------
Maybe that's obsolete since I'm using SP4. Anyway, I think the
toolhelp.dll file on the target system is the same one it's trying to
download. The date and time of the one on the target system matches the
one I found in C:\Program Files\Common Files\Microsoft Shared\Windows
CE Tools\Platman\target\wce500\x86\. (07/06/2004 12:39) So there
shouldn't be any conflict as far as that's concerned.
Still plugging away.