BruNews
Messages postés21040Date d'inscriptionjeudi 23 janvier 2003StatutModérateurDernière intervention21 août 2019
-
30 juin 2005 à 21:48
elguevel
Messages postés718Date d'inscriptionjeudi 19 décembre 2002StatutMembreDernière intervention22 novembre 2016
-
3 oct. 2005 à 13:23
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.
//-----------------------------------------------------------------------------
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpLine, int nShow)
{
return DialogBox(hInst, (LPCSTR)IDD_MAIN, (HWND)NULL, (DLGPROC)MainProc);
}
glipper
Messages postés246Date d'inscriptiondimanche 2 juin 2002StatutMembreDernière intervention11 septembre 20161 5 juil. 2005 à 20:06
Moi je n'arrive pas à le compiler en fait.
J'utilise Visual C++ 5. En fait il refuse celle ligne :
(*fpDFD)(szWideURL);
error C2197: 'int(__stdcall *)(void)' : too many actual parameters
Glipper
cs_magma
Messages postés198Date d'inscriptionvendredi 4 avril 2003StatutMembreDernière intervention18 mars 2011 2 juil. 2005 à 12:52
J'ai constaté qu'il y avait des tonnes de sources
en VB utilisant l'API DoFileDownload (Voir Google).
Celle-ci est une adaptation en C.
Zazour
Messages postés120Date d'inscriptionmercredi 7 mai 2003StatutMembreDernière intervention14 janvier 2006 1 juil. 2005 à 17:29
tu peux expliquer le continu de la dll "shdocvw.dll" que tu utilises STP ?
cs_eRoZion
Messages postés241Date d'inscriptionvendredi 23 mai 2003StatutMembreDernière intervention 8 octobre 20071 1 juil. 2005 à 05:25
Salut,
à prioris pas de problème chez moi, tout fonctionne.
eRoZion
cs_Joky
Messages postés1787Date d'inscriptionlundi 22 novembre 2004StatutMembreDernière intervention31 janvier 20092 30 juin 2005 à 22:43
J'ai la même erreur :)
Et vala aucune explication à donné. Mon compte est en mode administrateur, je passe par un routeur si ça peut aidé lol, et j'aime les frites, je sais pas si ça a de l'importance mais voila ;)
DeAtHCrAsH
Messages postés2670Date d'inscriptionvendredi 25 janvier 2002StatutMembreDernière intervention 6 février 2013 30 juin 2005 à 22:16
Erreur : Les paramètres de sécurité actuels ne vous permettent pas de télécharger ce fichier.
Explications ?
BruNews
Messages postés21040Date d'inscriptionjeudi 23 janvier 2003StatutModérateurDernière intervention21 août 2019 30 juin 2005 à 21:48
3 oct. 2005 à 13:23
6 juil. 2005 à 10:23
Merci
6 juil. 2005 à 08:16
#include <windows.h>
#include "telec.h"
typedef ULONG (WINAPI *DFD)(LPCWSTR);
//-----------------------------------------------------------------------------
BOOL CALLBACK MainProc(HWND hDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
char szAnsiURL[MAX_PATH];
WCHAR szWideURL[MAX_PATH];
static HINSTANCE hInstDLL;
static HBRUSH hbEdit;
DFD fpDFD;
//static FARPROC fpDFD;
switch (uMsg)
{
case WM_INITDIALOG:
hInstDLL = LoadLibrary("shdocvw.dll");
hbEdit = CreateSolidBrush(RGB(255, 255, 200));
SetFocus(GetDlgItem(hDlg, IDC_EDIT));
return FALSE;
case WM_CTLCOLOREDIT:
SetTextColor((HDC)wParam, RGB(255, 0, 0));
SetBkColor((HDC)wParam, RGB(255, 255, 200));
return (BOOL)hbEdit;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDC_CLIC:
GetDlgItemText(hDlg, IDC_EDIT, szAnsiURL, MAX_PATH);
if(hInstDLL)
{
if(fpDFD = (DFD)GetProcAddress(hInstDLL, "DoFileDownload"))
{
MultiByteToWideChar(CP_ACP, 0, szAnsiURL, -1, szWideURL, sizeof(szWideURL));
fpDFD(szWideURL);
}
else
MessageBox(hDlg, "Erreur: GetProcAddress() ", "Téléchargement", MB_OK|MB_ICONSTOP);
}
else
MessageBox(hDlg, "Erreur: LoadLibrary() ", "Téléchargement", MB_OK|MB_ICONSTOP);
SetFocus(GetDlgItem(hDlg, IDC_EDIT));
return TRUE;
case IDCANCEL:
FreeLibrary(hInstDLL);
EndDialog (hDlg, 0);
return TRUE;
}
break;
}
return FALSE;
}
//-----------------------------------------------------------------------------
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpLine, int nShow)
{
return DialogBox(hInst, (LPCSTR)IDD_MAIN, (HWND)NULL, (DLGPROC)MainProc);
}
5 juil. 2005 à 20:06
J'utilise Visual C++ 5. En fait il refuse celle ligne :
(*fpDFD)(szWideURL);
error C2197: 'int(__stdcall *)(void)' : too many actual parameters
Glipper
2 juil. 2005 à 12:52
en VB utilisant l'API DoFileDownload (Voir Google).
Celle-ci est une adaptation en C.
1 juil. 2005 à 17:29
1 juil. 2005 à 05:25
à prioris pas de problème chez moi, tout fonctionne.
eRoZion
30 juin 2005 à 22:43
Et vala aucune explication à donné. Mon compte est en mode administrateur, je passe par un routeur si ça peut aidé lol, et j'aime les frites, je sais pas si ça a de l'importance mais voila ;)
30 juin 2005 à 22:16
Explications ?
30 juin 2005 à 21:48