+link rel
[www.jankratochvil.net.git] / project / captive / doc / CacheManager.html.pl
index f144239..fcd893e 100755 (executable)
@@ -27,16 +27,16 @@ use warnings;
 
 BEGIN{ open F,"Makefile"; our $top_dir=pop @{[split /\s/,(grep /^top_srcdir/,<F>)[0]]}; eval "use lib '$top_dir'"; close F; }
 use My::Web;
-require "CGI";
-use project::captive::doc::Macros;
+require CGI;
+BEGIN { Wuse 'project::captive::doc::Macros'; }
 
 
-My::Web->init(
+project::captive::doc::Macros->init(
                "__PACKAGE__"=>__PACKAGE__,
                "title"=>'Captive NTFS Developer Documentation: NT Cache Manager',
-               "head_css"=>$doc_Macros_head_css,
+               "rel_prev"=>'Reverse.html.pl',
+               "rel_next"=>'Details.html.pl',
                );
-My::Web->heading();
 
 
 print <<"HERE";
@@ -155,7 +155,7 @@ print <<"HERE";
        Fortunately it is safe to never destroy
        <span class="type">SharedCacheMap</span> and leave it leaked - everything
        gets clean in the
-       @{[ a_href '#sandbox','sandboxed environment' ]} soon anyway.</p>
+       @{[ a_href 'Details.html.pl#sandbox','sandboxed environment' ]} soon anyway.</p>
 
        <p>There exist Map and Pin type objects for each
        <span class="type">SharedCacheMap</span> although they look very similiar.
@@ -209,10 +209,10 @@ print <<"HERE";
                        There can exist multiple Pin mappings of the same page (although
                        sharing the same memory space). This detaching must be implemented
                        even in the
-                       @{[ a_href '#synchronous','single-threaded' ]} W32 implementation
+                       @{[ a_href 'Details.html.pl#synchronous','single-threaded' ]} W32 implementation
                        of this project as it is affecting the behaviour of Cache Manager.
                        It was never
-                       @{[ a_href '#TraceFS','seen' ]} how to behave if multiple dirty Pin
+                       @{[ a_href 'CacheManager.html.pl#TraceFS','seen' ]} how to behave if multiple dirty Pin
                        mappings of the same page exist.</p>
                </dd>
        </dl>
@@ -265,7 +265,7 @@ print <<"HERE";
 
                <p>You can now pray a bit and snap the resulting Cache Manager tracing
                from <span class="productname">WinDbg</span> by
-               @{[ a_href '#WinDbg','W32 remote kernel debugging' ]}:</p>
+               @{[ a_href 'Reverse.html.pl#WinDbg','W32 remote kernel debugging' ]}:</p>
 
                @{[ doc_img 'ntdebug-windbg-boot','Successfuly connected <span class="productname">WinDbg</span>' ]}
 
@@ -293,8 +293,16 @@ print <<"HERE";
                        <span class="productname">NT Cache Manager</span> it can be easily
                        used ever for any other NT kernel API tracing. You need to provide
                        appropriate function wrappers in the main source file
-                       @{[ captive_srcfile './src/TraceFS/TraceFS-W32/TraceFS.c' ]}
-                       and you must also export them in
+                       @{[ captive_srcfile './src/TraceFS/TraceFS-W32/TraceFS.c' ]}.
+                       Original system functions being wrapped should be called with their
+                       original name. Your wrapping functions should have the first letter
+                       of their name replaced by character
+                       <span class="command">'T'</span> - wrapping of
+                       <span class="function">CcInitializeCacheMap()</span> must be
+                       done be your function
+                       <span class="function">TcInitializeCacheMap()</span>.
+                       Prototypes of both the wrapping and wrapped functions must be the same.
+                       You must also export all the wrapped functions by
                        @{[ captive_srcfile './src/TraceFS/TraceFS-W32/TraceFS.def' ]}.
                        @{[ captive_srcfile './src/TraceFS/hookfs.pl' ]} has no hardcoded
                        function names &ndash; it will hook exactly the exported entries.</p>
@@ -308,4 +316,4 @@ print <<"HERE";
 HERE
 
 
-My::Web->footer();
+project::captive::doc::Macros->footer();