EldoS | Feel safer!

Software components for data protection, secure storage and transfer

CallbackFilter.OpenFile fails

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
Posted: 05/19/2010 00:26:42
by  ndee
There is one file in my test set, which fails to open. OpenFile in my program just returns invalid handle, I don't know how to obtain any extended error info.
I tried to pass this file to Encrypt Sample, and had the same result - OpenFile fails too.
All other files in the same directory are opened ok. And what's the most strange, when I copy this file to another directory - it opens ok too. However, this particular file in this particular directory fails to open.
What can be so special about it? Any help appreciated.
Posted: 05/19/2010 02:03:05
by Vladimir Cherniga (EldoS Corp.)

You may try to obtain the error code with GetLastError() api call. Also could you specify the full path to the file not opened ?
Posted: 05/19/2010 02:51:38
by ndee  (Basic support level)
Joined: 05/19/2010
Posts: 26

Ok, Marshal.GetLastWin32Error() gave me this: 1008 (An attempt was made to reference a token that does not exist.)

Path is the following: C:\temp\test\CallbackFilter\Samples\dotNET\C#\BaseFilter\bin\Debug\CBFilter.vshost.exe.manifest
Posted: 05/19/2010 04:09:32
by Vladimir Cherniga (EldoS Corp.)

Please specify in more details what is the filter rule did you set, and how did you running your test sample: from debugger ? from the same directory as filter rule set ? etc. Thanks.
Posted: 05/19/2010 04:23:31
by ndee  (Basic support level)
Joined: 05/19/2010
Posts: 26

I used OnPostOpenFileC to try open file. Running sample from debugger and without it gives the same result. No, not the same directory. I just copied these files there to fill test location.
Opening all other files always finishes ok. Opening this file always fails.
Posted: 05/19/2010 04:39:52
by Vladimir Cherniga (EldoS Corp.)

Could you install debug version of filter driver and using DebugView utility (from sysinternals.com) get the debug trace message from the kernel mode for the case of error opening file from callback. Also please specify you operation system version.
Posted: 05/19/2010 05:07:42
by ndee  (Basic support level)
Joined: 05/19/2010
Posts: 26

Ok, I've installed debug driver. Simply turning on "capture kernel" in DebugView doesn't seem to work, output is blank... anything else to do?
OS is WinXP Pro SP3 32bit.
Posted: 05/19/2010 06:39:08
by Vladimir Cherniga (EldoS Corp.)

Could you post your sample code binaries, i will try to reproduce the problem locally.
Posted: 05/19/2010 07:55:00
by ndee  (Basic support level)
Joined: 05/19/2010
Posts: 26

You can use your own "Encrypt" sample, C# version. Just set breakpoint here
            if (mHandle.IsInvalid)
                return; //<------

and try to open that file in some text editor. It seems only the path matters.
BTW, I've reproduced the same problem on Win7 x64bit. And tried both CallbackFilter 2.0 and 2.1 beta, the same behavior.
Posted: 05/19/2010 08:26:07
by Vladimir Cherniga (EldoS Corp.)

Did your code not works in pre-open callback(OnOpenFileC) too ?
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.



Topic viewed 7137 times

Number of guests: 2, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!