ucwpotkan Posted May 15, 2017 Share Posted May 15, 2017 Hello i need VB.NET code converted into AutoIt code. Im paying 5$ for this easy work. PM me if you can do this. Public Shared Function Protect(ByVal hProcess As IntPtr) Dim dacl = GetProcessSecurityDescriptor(hProcess) dacl.DiscretionaryAcl.InsertAce(0, New CommonAce(AceFlags.None, AceQualifier.AccessDenied, CInt(ProcessAccessRights.PROCESS_ALL_ACCESS), New SecurityIdentifier(WellKnownSidType.WorldSid, Nothing), False, Nothing)) SetProcessSecurityDescriptor(hProcess, dacl) End Function <DllImport("advapi32.dll", SetLastError:=True)> _ Private Shared Function GetKernelObjectSecurity(ByVal Handle As IntPtr, ByVal securityInformation As Integer, <Out()> ByVal pSecurityDescriptor As Byte(), ByVal nLength As UInteger, ByRef lpnLengthNeeded As UInteger) As Boolean End Function <DllImport("advapi32.dll", SetLastError:=True)> _ Private Shared Function SetKernelObjectSecurity(ByVal Handle As IntPtr, ByVal securityInformation As Integer, <[In]()> ByVal pSecurityDescriptor As Byte()) As Boolean End Function Private Shared Function InlineAssignHelper(Of T)(ByRef target As T, ByVal value As T) As T target = value Return value End Function Public Shared Sub SetProcessSecurityDescriptor(ByVal processHandle As IntPtr, ByVal dacl As RawSecurityDescriptor) Const DACL_SECURITY_INFORMATION As Integer = &H4 Dim rawsd As Byte() = New Byte(dacl.BinaryLength - 1) {} dacl.GetBinaryForm(rawsd, 0) If Not SetKernelObjectSecurity(processHandle, DACL_SECURITY_INFORMATION, rawsd) Then Throw New Win32Exception() End If End Sub Public Shared Function GetProcessSecurityDescriptor(ByVal processHandle As IntPtr) As RawSecurityDescriptor Const DACL_SECURITY_INFORMATION As Integer = &H4 Dim psd As Byte() = New Byte(-1) {} Dim bufSizeNeeded As UInteger GetKernelObjectSecurity(processHandle, DACL_SECURITY_INFORMATION, psd, 0, bufSizeNeeded) If bufSizeNeeded < 0 OrElse bufSizeNeeded > Short.MaxValue Then Throw New Win32Exception() End If If Not GetKernelObjectSecurity(processHandle, DACL_SECURITY_INFORMATION, InlineAssignHelper(psd, New Byte(bufSizeNeeded - 1) {}), bufSizeNeeded, bufSizeNeeded) Then Throw New Win32Exception() End If Return New RawSecurityDescriptor(psd, 0) End Function <Flags()> _ Public Enum ProcessAccessRights SYNCHRONIZE = &H100000 STANDARD_RIGHTS_REQUIRED = &HF0000 PROCESS_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or &HFFF) End Enum Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 15, 2017 Moderators Share Posted May 15, 2017 ucwpotkan, If you cannot be bothered to make even a token effort to learn AutoIt for yourself then go and find a "for hire" programming site. I do not want to see a third "[PAYING]" thread from you or it will be your last. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
ucwpotkan Posted May 15, 2017 Author Share Posted May 15, 2017 Sorry, but i suck at converting codes from diferrent languages. Im still learning AutoIt. Link to comment Share on other sites More sharing options...
Developers Jos Posted May 15, 2017 Developers Share Posted May 15, 2017 (edited) Well... it is your 3rd thread you created where you prepared to pay this $5 amount. Not sure what kind of hourly rate you are thinking of but it is somewhat of a joke in case you are looking for serious people. Anyways: this site is not looking for payed coding work so you need to take that somewhere else. Since you already stated it is "easy work" i would indeed suggest you give it a go. Jos Edited May 15, 2017 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 15, 2017 Moderators Share Posted May 15, 2017 Agreed, this amazing display of laziness is getting annoying. Thread locked, if anyone wants to contact you to accept your offer they can PM you. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts