Click here to Skip to main content
15,897,187 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionCrystal Report Pin
alien viper5-Feb-06 18:10
alien viper5-Feb-06 18:10 
AnswerRe: Crystal Report Pin
shabonaa6-Feb-06 12:54
shabonaa6-Feb-06 12:54 
QuestionAdministrator Pin
dev dhoundiyal5-Feb-06 17:46
dev dhoundiyal5-Feb-06 17:46 
AnswerRe: Administrator Pin
Dave Kreskowiak6-Feb-06 2:37
mveDave Kreskowiak6-Feb-06 2:37 
QuestionHow to change the font in the title bar Pin
Chatura Dilan5-Feb-06 14:50
Chatura Dilan5-Feb-06 14:50 
AnswerRe: How to change the font in the title bar Pin
Dave Kreskowiak5-Feb-06 16:53
mveDave Kreskowiak5-Feb-06 16:53 
GeneralRe: How to change the font in the title bar Pin
Chatura Dilan5-Feb-06 23:56
Chatura Dilan5-Feb-06 23:56 
QuestionHow to solve PInvokeStackImbalance problem! Pin
JUNEYT5-Feb-06 7:23
JUNEYT5-Feb-06 7:23 
Hello!

I got an answer from Dave but whatever I tried didn't wotk out to solve PInvokeStackImbalance problem. I am using VS 2005. Eventough I changed the Integers in the GetshortPath declaration below I still got the same problem.
I have included the code below. If you can see the problem, please let me know.

Thanks!

<dllimport("kernel32.dll", setlasterror:="True," charset:="CharSet.Auto)"> _
Public Shared Function GetShortPathName(ByVal longPath As String, <marshalas(unmanagedtype.lptstr)> ByVal ShortPath As StringBuilder, <marshalas(unmanagedtype.u4)> ByVal bufferSize As Integer) As Integer
End Function


Private Function GetDosPath(ByVal LongPath As String) As String

Dim sb As New StringBuilder(1024)
On Error Resume Next '++
Dim retVal As Integer = Interop.GetShortPathName(longPath, sb, 1024) '<-- error occurs at that line
If retVal <> 0 Then
Dim sTemp As String = sb.ToString()
GetDosPath = sTemp
Else
Console.WriteLine("Error occured. GetLastError returns {0}.", Marshal.GetLastWin32Error())
End If

End Function
AnswerRe: How to solve PInvokeStackImbalance problem! Pin
Dave Kreskowiak5-Feb-06 7:30
mveDave Kreskowiak5-Feb-06 7:30 
GeneralI am sorry I forgot the header Pin
JUNEYT5-Feb-06 7:40
JUNEYT5-Feb-06 7:40 
GeneralRe: I am sorry I forgot the header Pin
Dave Kreskowiak5-Feb-06 7:47
mveDave Kreskowiak5-Feb-06 7:47 
GeneralI have stated it below! Thanks Pin
JUNEYT5-Feb-06 7:55
JUNEYT5-Feb-06 7:55 
GeneralRe: I have stated it below! Thanks Pin
Dave Kreskowiak5-Feb-06 8:21
mveDave Kreskowiak5-Feb-06 8:21 
Questionrandom Pin
rzvme5-Feb-06 2:12
rzvme5-Feb-06 2:12 
AnswerRe: random Pin
Guffa5-Feb-06 2:54
Guffa5-Feb-06 2:54 
GeneralRe: random Pin
rzvme5-Feb-06 2:56
rzvme5-Feb-06 2:56 
AnswerRe: random Pin
Guffa5-Feb-06 3:24
Guffa5-Feb-06 3:24 
GeneralRe: random Pin
rzvme5-Feb-06 6:58
rzvme5-Feb-06 6:58 
GeneralRe: random Pin
Chatura Dilan5-Feb-06 15:21
Chatura Dilan5-Feb-06 15:21 
Questionhow to load,plot and work on maps. Pin
haripaddu4-Feb-06 23:13
haripaddu4-Feb-06 23:13 
AnswerRe: how to load,plot and work on maps. Pin
Colin Angus Mackay5-Feb-06 8:54
Colin Angus Mackay5-Feb-06 8:54 
QuestionHow to get the startdate and end-dates of the current week, or last week? Pin
Hiske Bekkering4-Feb-06 23:01
professionalHiske Bekkering4-Feb-06 23:01 
AnswerRe: How to get the startdate and end-dates of the current week, or last week? Pin
Dave Kreskowiak5-Feb-06 4:14
mveDave Kreskowiak5-Feb-06 4:14 
GeneralRe: How to get the startdate and end-dates of the current week, or last week? Pin
Hiske Bekkering5-Feb-06 5:11
professionalHiske Bekkering5-Feb-06 5:11 
QuestionRead source code from webpage Pin
MIke24844-Feb-06 17:07
MIke24844-Feb-06 17:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.