Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Thu, 24 Jul 2008 20:15:02 -0700,    group: microsoft.public.dotnet.framework.sdk        back       


Problems with NtOpenSymbolicLinkObject...   
I am trying to get the directory that a "directory" symbolic link "points to" 
in Vista.  (I actually need this in my application!)  To do this I have to 
call the "NtQuerySymbolicLinkObject" Windows API function, but prior to 
calling the "NtQuerySymbolicLinkObject" routine, I have to call 
"NtOpenSymbolicLinkObject" to "open" the symbolic link.  (I have to call 
"LoadLibrary" and "GetProcAddress" several times to get the actual run-time 
addresses of these routines because they are not "exported" in the C++ 
run-time libraries), but that part is working fine!).  Anyway, the result of 
calling "NtOpenSymbolicLinkObject" is an "Invalid Parameter Information" 
error at line 42 in function "wcscat_s" located in file "tcscat_s.inl", where 
the expression that caused the error is "(L"Buffer is too small" && 0)" 
(???).   (I have fairly complete error catching and reporting in the 
program.)  To supply more (needed) information, the parameters to the 
"NtOpenSymbolicLinkObject" routine are as follows:

ObjectAttributes.Length                                  = 24
ObjectAttributes.RootDirectory                         = 0x00000000
ObjectAttributes.ObjectName                           = 0x0019a970
ObjectAttributes.ObjectName -> Buffer              = ""
ObjectAttributes.ObjectName -> MaximumLength = 2048
ObjectAttributes.ObjectName -> Length             = 0
ObjectAttributes.Attributes                              = 0x80000200 
(OBJ_KERNEL_HANDLE | GENERIC_READ)
ObjectAttributes.SecurityDescriptor                   = 0x00000000
ObjectAttributes.SecurityQualityOfService          = 0x00000000

From what I can tell from reading the (limited!) documentation, these 
parameters are all correct, and I have tried MANY (!) variations, all with no 
success.  Bottom line:  HELP!!!  I've been fooling with this for two whole 
days with no results!
date: Thu, 24 Jul 2008 20:15:02 -0700   author:   DanTheMostlyRetiredMan

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us