Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I can't test this right now so the following is a bit speculative :-(</p> <p>It is really hard to be sure what is causing what you see - AFAIK you need to check the following possibilities:</p> <ul> <li><p>Windows Service<br> In which user/context is the service running ?<br> Since Windows Vista MS has applied several changes to improve security that changed behaviour for example when accessing a network share from a Windows Service!</p></li> <li><p>Bitness<br> <code>ERROR_PARTIAL_COPY</code> can happen esp. when the bitness of your application differs from the bitness of the file you are checking.</p></li> <li><p>.NET files (EXE/DLL)<br> <code>GetBinaryType()</code> can behave strangely if the file you are checking happens to be a .NET file.</p></li> <li><p>Virus scanner etc.<br> Any virus scanner etc. can interfer in strange ways with <code>GetBinaryType()</code>.</p></li> <li><p>rootkit infection and similar<br> This can give really some strange results since no rootkit is perfect...</p></li> <li><p>virtual machine<br> IF the Windows Service is hosted inside a virtual machine I had several strange experiences with network access.</p></li> </ul> <p>Another point you could check is whether the behaviour is the same when running this code from a "normal application" - this could give you a clue whether the "Windows Service/Network share" has anything to do with it.</p> <p>Also check whether you can open the respective file (readonly, no locks) and what <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa364960%28v=vs.85%29.aspx" rel="nofollow"><code>GetFileType()</code></a> returns in that case.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload