home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ida35bc.zip / KERNEL.IDC < prev    next >
Text File  |  1996-01-29  |  1KB  |  32 lines

  1. //
  2. //    This file can be considered as an example how to insert your own
  3. //    comments for the imported DLLs. Now this file inserts a comment for
  4. //    the kernel function #23 'LOCKSEGMENT'. You can add your own comments
  5. //    for other functions and DLLs. To execute this file your should
  6. //    choose 'Execute IDC file' command from the IDA menu. Usually the
  7. //    hotkey is F2.
  8. //
  9.  
  10. static main(void) {
  11.   auto faddr;
  12.   auto fname;
  13.  
  14.   Message("Loading comments...\n");
  15.   fname = form("KERNEL_%ld",23);    // build the function name
  16.   faddr = LocByName(fname);        // get function address
  17.   if ( faddr != -1 ) {            // if the function exists
  18.     ExtLinA(faddr,0,";────────────────────────────────────────────────────────────────────────────");
  19.     ExtLinA(faddr,1,"; LockSegment (2.x)");
  20.     ExtLinA(faddr,2,"; ");
  21.     ExtLinA(faddr,3,"; In: AX - segment to lock");
  22.     ExtLinA(faddr,4,";     LockSegment function locks the specified discardable");
  23.     ExtLinA(faddr,5,"; segment. The segment is locked into memory at the given");
  24.     ExtLinA(faddr,6,"; address and its lock count is incremented (increased by one).");
  25.     ExtLinA(faddr,7,"; Returns");
  26.     ExtLinA(faddr,8,"; The return value specifies the data segment if the function is");
  27.     ExtLinA(faddr,9,"; successful. It is NULL if the segment has been discarded or an");
  28.     ExtLinA(faddr,10,"; error occurs.");
  29.   }
  30.   Message("Comment(s) are loaded.\n");
  31. }
  32.