Build this one:
include \masm32\include\masm32rt.inc
.data?
buffer db MAX_PATH dup(?)
.code
start:
invoke GetCurrentDirectory, MAX_PATH, addr buffer
invoke GetCommandLine
MsgBox 0, addr buffer, eax, MB_OK
exit
end start
Then
1. launch it by selecting and hitting Enter
2. launch it by dragging a file over it
Only 2xExplorer (http://netez.com/2xExplorer/)shows a decent behaviour.
no pictures ? :(
you're going to make me build that up, install 2x and freecommander ????
Quote from: jj2007 on December 10, 2013, 09:01:36 AM
Build this one:
include \masm32\include\masm32rt.inc
.data?
buffer db MAX_PATH dup(?)
.code
start:
invoke GetCurrentDirectory, MAX_PATH, addr buffer
invoke GetCommandLine
MsgBox 0, addr buffer, eax, MB_OK
exit
end start
Then
1. launch it by selecting and hitting Enter
2. launch it by dragging a file over it
Only 2xExplorer (http://netez.com/2xExplorer/)shows a decent behaviour.
Yeah umm naww it's okay I'll just keep writing lines that I know work.
Quote from: Evan on December 10, 2013, 11:29:31 AM
Quote from: jj2007 on December 10, 2013, 09:01:36 AM
Build this one:
include \masm32\include\masm32rt.inc
.data?
buffer db MAX_PATH dup(?)
.code
start:
invoke GetCurrentDirectory, MAX_PATH, addr buffer
invoke GetCommandLine
MsgBox 0, addr buffer, eax, MB_OK
exit
end start
Then
1. launch it by selecting and hitting Enter
2. launch it by dragging a file over it
Only 2xExplorer (http://netez.com/2xExplorer/)shows a decent behaviour.
Yeah umm naww it's okay I'll just keep writing lines that I know work.
I'm like flying or something I thought this was a thread I started sorry.
Define "a decent behaviour"
Quote from: dedndave on December 10, 2013, 09:39:24 AM
you're going to make me build that up, install 2x and freecommander ????
Quote from: sinsi on December 10, 2013, 03:35:38 PM
Define "a decent behaviour"
Sorry, folks. Point is that FC and Windows Explorer surprised me with claiming that current folder (in my opinion C:\Masm32\Examples) was something crappy like C:\Users\jj\Documents
That was XP, now I'm on Win7-32, and it works as expected.
@Evan: This forum is not a playground. Post only if you have something substantial to contribute. There is the Romper room (http://masm32.com/board/index.php?board=20.0) if you want to play around. And, please, don't quote entire posts, and
don't open new threads for every little question you may have. Open one thread, e.g. "Beginner's questions", and keep posting there.
I think it has to do with Microsoft wanting a "docu-centric" approach, that the document is more important than the program.
Open a text file with notepad, the title bar is "document.txt - Notepad"
I can not find lite version on the site.
2xExplorer is officially pronounced dead. You can still download it for free, but that's about it. xplorer² is the way to the future. It comes with a "pro" and a "lite" version. The lite version is free and much more powerful than 2xExplorer, and you should really give it a try!
Back to WinXP SP3 (open=simply open the exe, drag=drag a file over the exe):
Open FreeCommander current dir: D:\Masm32\examples
Drag FreeCommander current dir: D:\xxx\FreeCommander
Open WinXP Explorer current dir: D:\Masm32\examples
Drag WinXP Explorer current dir: C:\Documents and Settings\user
Open 2xExplorer current dir: D:\Masm32\examples
Drag 2xExplorer current dir: D:\Masm32\examplesInteresting that Win7 behaves better. Apparently they have learned something ;-)
This may be a minor issue, but the dragged files were always in the same folder; so why set the obscure path "C:\Documents and Settings\user" as current directory??
Applications assuming that a filename without path is sufficient may fail miserably, if they don't explicitly set the current folder based either on the commandline or on the executable's path. They will work on Win7 but fail on XP.
By the way, a simple batch file behaves exactly the same:
@echo off
echo %cd% && pauseQuote from: sinsi on December 10, 2013, 06:58:55 PM
I think it has to do with Microsoft wanting a "docu-centric" approach, that the document is more important than the program.
I would agree if Windows Explorer set the current dir to the folder of the document passed in the commandline. But it doesn't, on XP...
Works here.
C:\MASM32\SOURCE
Press any key to continue . . .