existe algun algoritmo para encontrar todos los caminos de un grafo? desde un vertice A a un vertice B
ayuda please...
ayuda please...
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
format PE GUI 4.0
entry start
include 'c:\FASM\INCLUDE\win32a.inc'
ID_CAPTION = 100
ID_MESSAGE = 102
section '.code' code readable executable
start:
invoke GetModuleHandle,0
invoke DialogBoxParam,eax,37,HWND_DESKTOP,DialogProc,0
proc DialogProc hwnddlg,msg,wparam,lparam
cmp [msg],WM_INITDIALOG
je .funcion
cmp [msg],WM_COMMAND
je .funcion
cmp [msg],WM_CLOSE
je .finish
xor eax,eax
jmp .cerrar
.funcion:
cmp [wparam],BN_CLICKED shl 16 + IDOK
jne .proceso
cmp [wparam],BN_CLICKED shl 16 + IDCANCEL
je .finish
.proceso:
invoke SetDlgItemText,[hwnddlg],ID_MESSAGE,[prueba]
jmp .cerrar
.finish:
invoke EndDialog,[hwnddlg],0
.cerrar:
ret
endp
section '.data' readable writeable
flags dd ?
caption rb 40h
message rb 100h
_outhandle dd ?
_written dd ?
buscado dd ?
wfd WIN32_FIND_DATA
handle dd ?
encontrado dd ?
prueba dd 'hola',0
;====================IMPORTS===============================================
section '.idata' import data readable writeable
library kernel,'KERNEL32.DLL',\
user,'USER32.DLL'
import kernel,\
AllocConsole, 'AllocConsole',\
GetStdHandle, 'GetStdHandle',\
WriteConsole, 'WriteConsoleA',\
ReadConsole, 'ReadConsoleA',\
ExitProcess, 'ExitProcess',\
WriteFile,'WriteFile',\
lstrlen,'lstrlen',\
FindFirstFile,'FindFirstFileA',\
FindNextFile,'FindNextFileA',\
FindClose,'FindClose',\
GetModuleHandle,'GetModuleHandleA',\
lstrcat, 'lstrcat'.\
import user,\
DialogBoxParam,'DialogBoxParamA',\
SetDlgItemText,'SetDlgItemTextA',\
GetDlgItemText,'GetDlgItemTextA',\
SendDlgItemMessage ,'SendDlgItemMessageW',\
SendMessage , 'SendMessageA',\
AnimateWindow, 'AnimateWindow',\
wsprintf, 'wsprintfA',\
MessageBox, 'MessageBoxA',\
EndDialog,'EndDialog'
section '.rsrc' resource data readable
directory RT_DIALOG,dialogs
resource dialogs,\
37,LANG_ENGLISH+SUBLANG_DEFAULT,creacion
dialog creacion,'LISTADOR DE ARCHIVOS',70,70,190,175,WS_CAPTION+WS_POPUP+WS_SYSMENU+DS_MODALFRAME
dialogitem 'STATIC','&DIRECTORIO:',-1,10,10,70,8,WS_VISIBLE
dialogitem 'EDIT','',ID_CAPTION,10,20,170,13,WS_VISIBLE+WS_BORDER+WS_TABSTOP
dialogitem 'STATIC','&CONTENIDO:',-1,10,40,70,8,WS_VISIBLE
dialogitem 'EDIT','',ID_MESSAGE,10,50,170,100,WS_VISIBLE+WS_BORDER+WS_TABSTOP+ES_AUTOHSCROLL
dialogitem 'BUTTON','OK',IDOK,85,150,45,15,WS_VISIBLE+WS_TABSTOP+BS_DEFPUSHBUTTON
dialogitem 'BUTTON','C&ancel',IDCANCEL,135,150,45,15,WS_VISIBLE+WS_TABSTOP+BS_PUSHBUTTON
enddialog
format PE GUI 4.0
entry start
include 'c:\FASM\INCLUDE\win32a.inc'
ID_CAPTION = 101
ID_MESSAGE = 102
section '.code' code readable executable
start:
invoke GetModuleHandle,0
invoke DialogBoxParam,eax,37,HWND_DESKTOP,DialogProc,0
proc DialogProc hwnddlg,msg,wparam,lparam
cmp [msg],WM_INITDIALOG
je .proceso
cmp [msg],WM_COMMAND
je .funcion
cmp [msg],WM_CLOSE
je .cerrar
xor eax,eax
jmp .finish
.funcion:
cmp [wparam],BN_CLICKED shl 16 + IDCANCEL
je .cerrar
cmp [wparam],BN_CLICKED shl 16 + IDOK
jne .proceso
.cerrar:
invoke EndDialog,[hwnddlg],0
.proceso:
invoke SetDlgItemText,[hwnddlg],ID_MESSAGE,'hola'
.finish:
ret
endp
section '.data' readable writeable
flags dd ?
caption rb 40h
message rb 100h
_outhandle dd ?
_written dd ?
buscado dd ?
wfd WIN32_FIND_DATA
handle dd ?
encontrado dd ?
;====================IMPORTS===============================================
section '.idata' import data readable writeable
library kernel,'KERNEL32.DLL',\
user,'USER32.DLL'
import kernel,\
AllocConsole, 'AllocConsole',\
GetStdHandle, 'GetStdHandle',\
WriteConsole, 'WriteConsoleA',\
ReadConsole, 'ReadConsoleA',\
ExitProcess, 'ExitProcess',\
WriteFile,'WriteFile',\
lstrlen,'lstrlen',\
FindFirstFile,'FindFirstFileA',\
FindNextFile,'FindNextFileA',\
FindClose,'FindClose',\
GetModuleHandle,'GetModuleHandleA',\
lstrcat, 'lstrcat'.\
import user,\
DialogBoxParam,'DialogBoxParamA',\
SetDlgItemText,'SetDlgItemTextA',\
GetDlgItemText,'GetDlgItemTextA',\
SendDlgItemMessage ,'SendDlgItemMessageW',\
LoadIcon , 'LoadIconA',\
SendMessage , 'SendMessageA',\
AnimateWindow, 'AnimateWindow',\
SetFocus , 'SetFocus',\
GetDlgItemInt, 'GetDlgItemInt',\
SetDlgItemInt, 'SetDlgItemInt',\
wsprintf, 'wsprintfA',\
MessageBox, 'MessageBoxA',\
EndDialog,'EndDialog'
section '.rsrc' resource data readable
directory RT_DIALOG,dialogs
resource dialogs,\
37,LANG_ENGLISH+SUBLANG_DEFAULT,creacion
dialog creacion,'LISTADOR DE ARCHIVOS',70,70,190,175,WS_CAPTION+WS_POPUP+WS_SYSMENU+DS_MODALFRAME
dialogitem 'STATIC','&DIRECTORIO:',-1,10,10,70,8,WS_VISIBLE
dialogitem 'EDIT','',ID_CAPTION,10,20,170,13,WS_VISIBLE+WS_BORDER+WS_TABSTOP
dialogitem 'STATIC','&CONTENIDO:',-1,10,40,70,8,WS_VISIBLE
dialogitem 'EDIT','',ID_MESSAGE,10,50,170,100,WS_VISIBLE+WS_BORDER+WS_TABSTOP+ES_AUTOHSCROLL
dialogitem 'BUTTON','OK',IDOK,85,150,45,15,WS_VISIBLE+WS_TABSTOP+BS_DEFPUSHBUTTON
dialogitem 'BUTTON','C&ancel',IDCANCEL,135,150,45,15,WS_VISIBLE+WS_TABSTOP+BS_PUSHBUTTON
enddialog
format PE console
entry start
include 'win32ax.inc'
section '.code' code readable executable
start:
invoke AllocConsole
invoke GetStdHandle, STD_OUTPUT_HANDLE
mov [_outhandle], eax
invoke FindFirstFile,buscado,wfd
invoke WriteConsole, [_outhandle],wfd , 13, _written, 0
section '.data' data readable writeable
_outhandle dd ?
_written dd ?
buscado DB '*.*',0
wfd WIN32_FIND_DATA
section 'idata' import data readable writeable
library kernel, 'KERNEL32.DLL'
import kernel,\
AllocConsole, 'AllocConsole',\
GetStdHandle, 'GetStdHandle',\
WriteConsole, 'WriteConsoleA',\
ReadConsole, 'ReadConsoleA',\
ExitProcess, 'ExitProcess',\
WriteFile,'WriteFile',\
lstrlen,'lstrlen',\
FindFirstFile,'FindFirstFileA',\
FindNextFile,'FindNextFileA',\
FindClose,'FindClose'.\
format PE console
entry start
include 'win32w.inc'
;======================================
section '.data' data readable writeable
;======================================
ASCIIZ DB '*.*',0
DTASeg DW ?
;=======================================
section '.code' code readable executable
;=======================================
start:
xor eax,eax ; limpio EAX
mov ah,4eh ; encuentro el primer archivo
mov ecx,1Eh ; obtengo el nombre del primer archivo
mov edx,ASCIIZ
ccall [printf],edx
;====================================
section '.idata' import data readable
;====================================
library kernel,'kernel32.dll',\
msvcrt,'msvcrt.dll' ,\user32,'user32.dll'
import user32,MessageBoxA,'MessageBoxA'
import kernel,\
ExitProcess,'ExitProcess'
import msvcrt,\
printf,'printf',\
getchar,'_fgetchar'