Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

bjwoodburn

@bjwoodburn
About
Posts
6
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Visual Studio .Net removing code behind pages
    B bjwoodburn

    Has anybody had problems with the code behind pages (.aspx.vb) being reset to default (ie. 'to do put code here) when loading web solutions from a remote web server?? Fortunately, one of our team has copies of the code stored on his local machine which we can re-instate to our development server but it is very f*ckin annoying. There seems to be no pattern to this at all...... :mad::mad::mad:

    Visual Studio csharp visual-studio sysadmin collaboration regex

  • DataControl ---> Data "object" HowTo???
    B bjwoodburn

    You are better off passing the recordset object if thats what you are going to be playing with. Otherwise you are using late binding. Something like this : Sub DrawData(ByVal oRec as ADODB.Recordset) Dim dField as Field For Each dField in oRec.Fields MsgBox dField.Value & " " & dField.Name Next End Function Sub Main() Dim oRecord as ADODB.RecordSet Dim ssql as String Dim oConnect As ADODB.Connection oConnect.Open "Blah,Blah" ssql = "SELECT * FROM table1" oRecord.Open ssql, oConnect, adOpenForwardOnly, adLockReadOnly DrawData(oRecord) MsgBox "Success" End Sub

    Visual Basic c++ com json question

  • API functions
    B bjwoodburn

    Help Please...! I'm trying to add a shutdown routine to a program using the ExitWindowsEx API function. I'm running on Windows XP. The problem is that the LookUpPrivilegeValue function keeps crashing out saying : Instance of an object is not set. As far as I know I'm not referencing an object merely calling a function. Can anyone help? Here is the code I am using: Option Explicit On Imports System Imports System.Runtime.InteropServices Public Class ShutDownAPI Private Const EWX_LogOff As Long = 0 Private Const EWX_SHUTDOWN As Long = 1 Private Const EWX_REBOOT As Long = 2 Private Const EWX_FORCE As Long = 4 Private Const EWX_POWEROFF As Long = 8 Public Shared Function ExitWindowsEx(ByVal dwOptions As Long, ByVal dwReserved As Long) As Long End Function Public Shared Function GetLastError() As Long End Function Public Shared Function GetVersion() As Long End Function Public Shared Function GetCurrentProcess() As Long End Function Public Shared Function OpenProcessToken(ByVal ProcessHandle As Long, ByVal DesiredAccess As Long, ByVal TokenHandle As Long) As Long End Function Private Declare Function LookupPrivilegeValue Lib "advapi32.dll" Alias "LookupPrivilegeValueA" (ByVal lpSystemName As String, ByVal lpName As String, ByVal lpLuid As LUID) As Long Public Shared Function AdjustTokenPrivileges(ByVal TokenHandle As Long, ByVal DisableAllPrivileges As Long, ByVal NewState As TOKEN_PRIVILEGES, ByVal BufferLength As Long, ByVal PreviousState As TOKEN_PRIVILEGES, ByVal ReturnLength As Long) As Long End Function Public Shared Sub SetLastError(ByVal dwErrCode As Long) End Sub Private Const mlngWindows95 = 0 Private Const mlngWindowsNT = 1 Private glngWhichWindows32 As Long Public Structure LUID Public UsedPart As Long Public IgnoredForNowHigh32BitPart As Long End Structure Public Structure LUID_AND_ATTRIBUTES Public TheLuid As LUID Public Attributes As Long End Structure Public Structure TOKEN_PRIVILEGES Public PrivilegeCount As Long Public TheLuid As LUID Public Attributes As Long End Structure Public Enum sdAction Reboot = 1 Shutdown = 2 Logoff = 3 End Enum

    Visual Basic help json question

  • Getting File Name of an application with handle
    B bjwoodburn

    Hi, Problem: Does anyone know of a way to retrieve the full path and file name of an application with just the handle to the window? I have called the API function "FindWindow" to retrieve the handle: Dim lngRet as Long lngRet = FindWindow(vbNullString, "MyTitle") But how can I obtain further from this? Help Please!!! :confused: Brian Woodburn

    Visual Basic help question json

  • What do you Yanks think of John Walker ?
    B bjwoodburn

    Sorry to be pedantic but. Johnny Walker is a scotch whisky and therefore doesn't have an 'e' between the 'k' and 'y'. Irish whiskey, American whiskey and scotch whisky. As for the other question, I think the whole situation has brought the worst out in everyone so stories like that are no longer a surprise to me. The process of de-sensitisation (don't know if thats a word!!) has begun, and there ain't shit we can do about it. :((

    The Lounge question html database com announcement

  • Advice please...
    B bjwoodburn

    As a relative newcomer to the world of programming (approx. 18 months) I have managed to gain a good grasp of the following: ASP, SQL, VB, javascript... However, I really want to get into programming C++. I have played around with things like creating simple DLLs to reference in VB projects. I have read about the concepts behind it such as (multiple) inheritance, classes etc. but can anyone suggest ways of really getting to grips with the syntax etc. Any good tutorials, books people have used or techniques that you have found make it easier to understand? Answers on a post card...... Cheers, Brian:)

    The Lounge c++ javascript database oop question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups