Dan ---
This is an interesting issue you are hitting. So let me ask you a couple of
questions

1) After copying down your dll to the cradled device, is it's attribute
already set to System or is it after the CeRapiInvoke call?
2) May be the security restrictions are in place because the dll is in
\Windows directory - try placing it at the root of the directory
3) After the CeRapiInvoke Call returns - can you update the dll again with
the copy you have on the desktop?
I am still shocked how the System flags is being set ---
Let me know your findings
Juggs Ravalia [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"dan h" <dan
> wrote in message
news:4993772C-494C-41F6-BC4C-...
> Hi all,
>
> My goal is to copy a Windows Mobile DLL to the device, call a function in
> it, then delete the DLL. Everything works up til I try to delete the DLL.
> It appears there is no way to remotely delete a DLL after a function is
> remotely invoked.
>
> My desktop program copies a temporary device DLL to the device's \windows
> dir, then invokes a function in it via CeRapiInvoke() to get some info.
> The
> Invoke call causes the "System" attribute of the DLL to be automagically
> set
> on the device.
>
> My desktop app isn't privileged so can't clear the System attribute via
> CeSetFileAttributes(), and CeDeleteFile() won't delete a file with the
> System
> attribute set.
>
> Does anyway know a way around this? I've been digging for a bit to no
> avail. This is happening on a Windows Mobile 5.0 phone and Windows 2003
> PPC.
>
>
> I'm tempted to attempt having the dll reset its own attribute after being
> loaded...
>
> Thanks,
> Dan