Hi, I'm trying to write some VA Smalltalk to shutdown windows. Basically I'm trying to write the VA Smalltalk equivalent of the code quoted below. So far (playing in a workspace) I have:
which seems to work until I try to add: tkp PrivilegeCount: 1. which crashes everything with: "Exit due to error: 53 - General protection fault - read from invalid memory location". Does anyone have any idea where I'm going wrong? Thanks, Lou BOOL CApp::Shutdown()-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/d0KMPcH8Ls8J. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
fixing the memory of the privileges structure: tkp := OSTokenPrivileges new fix. ptkp := OSTokenPrivileges null fix. get past that problem. Now I'm not sure ho to do this: tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; Lou
-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/wNbYvEpFuH0J. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
Okay, now the code below seems to function without a problem. | op h tkp ptkp luid | But when I try to access or set tkp Privileges Luid, I get into trouble. Any ideas? Lou
-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/ddmpr50QdDsJ. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
Hallo
try
OSTokenPrivileges callocVariable: 3
it is a variable struct and Priviliges is in the variable part, donot know how much entries are needed
regards
wolfgang
Am Freitag, 16. November 2012 00:07:01 UTC+1 schrieb Louis LaBrunda: -- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/ywIxDAZ188oJ. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
Thanks Wolfgang, That helps, I think. I am at a point where I make the call to adjustTokenPrivileges: but it still returns false. I am wondering what to use for the bufferLength value? Also, OSLuidAndAttributes>>Attributes it is at an offset of 8. This seems odd to me, shouldn't it be 7, since the offsets start at zero (0)? Lou
-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/pJMd-nzj9eYJ. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
Hi, Well I finally have windows shutdown code (see below) working from VA Smalltalk. Windows is such a pain in the ass or am I expecting too much? Anyway, it works. Execute the first line in the comment to add the pool dictionaries to the workspace and the the second line to reset things. Lou "-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/TNeWqlGUOrEJ. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
Free forum by Nabble | Edit this page |