NO

Recent Posts

Pages: [1] 2 3 ... 10
1
Beginner questions / Web Search
« Last post by Grincheux on Yesterday at 06:12:40 PM »
I try to make a search on many web search engines.
I need your help to understand how I must do it.

I join my project

Code: [Select]
PCTSTR rgpszAcceptTypes[] = {
_T("text/*"),
_T("video/*"),
_T("image/*"),
_T("audio/*"),
NULL
} ;

char szEngineTitle[] = _T("My HTTP Search Engine") ;
char szGet[] = _T("GET") ;
char szBingSearch[] = _T("search?q=%s") ;
char szBingEngine[] = _T("http://www.bing.com") ;

LPSTR Search_OnTheWeb(LPSTR __lpszEngine,LPSTR __lpszVerb,LPDWORD __lpResultLength)
{
HINTERNET _hInternet, _hConnect, _hRequest ;
DWORD _dwContentLen, _dwBufLen, _cReadCount, _dwBytesRead, _dwReadSize ;
DWORD _dwError ;
LPSTR _lpData, _lpCopyPtr ;

_hInternet = _hConnect = _hRequest = NULL ;
_dwReadSize = _dwContentLen = _cReadCount = _dwBytesRead = _dwBufLen = _dwError = 0 ;
_lpData = _lpCopyPtr = NULL ;
*__lpResultLength = 0 ;

if(__lpszEngine)
{
if(__lpszVerb)
{
if(__lpResultLength)
{
_hInternet = InternetOpen(szEngineTitle,INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,0) ;
if(_hInternet)
{
_hConnect = InternetConnect(_hInternet,__lpszEngine,INTERNET_DEFAULT_HTTP_PORT,NULL,NULL,INTERNET_SERVICE_HTTP,0,0) ;
if(_hConnect)
{
_hRequest = HttpOpenRequest(_hConnect,szGet,__lpszVerb,NULL,NULL,rgpszAcceptTypes,INTERNET_FLAG_RELOAD,0) ;
if(_hRequest)
{
if(HttpSendRequest(_hRequest,NULL,0,NULL,0))
{
_dwBufLen = sizeof(_dwContentLen) ;

if(!HttpQueryInfo(_hRequest,HTTP_QUERY_CONTENT_LENGTH|HTTP_QUERY_FLAG_NUMBER,(LPVOID)&_dwContentLen,&_dwBufLen,0))
{
_dwError = GetLastError() ;

if(_dwError == ERROR_HTTP_HEADER_NOT_FOUND)
{
InternetCloseHandle(_hRequest) ;
InternetCloseHandle(_hInternet) ;
InternetCloseHandle(_hConnect) ;

return (NULL) ;
}
else
{
if(_dwError == ERROR_INSUFFICIENT_BUFFER)
{
_lpData = (LPSTR) HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,_dwContentLen + 1) ;
if(_lpData)
{
// We will read 10% of data with each read.
_dwReadSize = _dwContentLen / 10 ;

_lpCopyPtr = _lpData ;

for(_cReadCount = 0 ; _cReadCount < 10 ; _cReadCount++)
{
InternetReadFile(_hRequest,_lpCopyPtr,_dwReadSize,&_dwBytesRead) ;
_lpCopyPtr = _lpCopyPtr + _dwBytesRead ;
}

// Extra read to account for integer division round off
InternetReadFile(_hRequest,_lpCopyPtr,_dwContentLen - (_lpCopyPtr - _lpData),&_dwBytesRead) ;

// Null terminate data
_lpData[_dwContentLen] = 0 ;

*__lpResultLength = _dwContentLen ;
}
}
}
}

InternetCloseHandle(_hRequest) ;
}

InternetCloseHandle(_hInternet) ;
}

InternetCloseHandle(_hConnect) ;
}
}
}
}
}

return (_lpData) ;
}

LPSTR Search_Bing(LPSTR __lpszString,LPDWORD __lpResultLength)
{
char _szTmp[1024] ;

wsprintf(_szTmp,szBingSearch,__lpszString) ;
return (Search_OnTheWeb(szBingEngine,_szTmp,__lpResultLength)) ;
}

LPSTR Search_Google(LPSTR __lpszString,LPDWORD __lpResultLength)
{
char _szTmp[1024] ;

wsprintf(_szTmp,szGoogleSearch,__lpszString) ;
return (Search_OnTheWeb(szGoogleEngine,_szTmp,__lpResultLength)) ;
}

The problem is at the line :
Code: [Select]
HttpSendRequest(_hRequest,NULL,0,NULL,0)
Could you help me please?

Thanks
2
General discussions / Re: work at home
« Last post by IrinaKasper on March 16, 2017, 04:18:04 PM »
As much as I like Freelancer, I think that the best freelance job board is https://www.xplace.com/ XPlace. It has higher hourly rates than the majority of other online marketplaces, doesn't charge a commission from freelancers, and there are a lot of job opportunities (entry-level and more complex ones). An excellent website to make a freelance career!
3
Add-ins / Re: Tabbed Windows Addin
« Last post by Grincheux on March 15, 2017, 05:52:56 AM »
Now there is a C file per tab and for about.
Added a ressource include file rather than finding all into main.h
4
Windows questions / Re: 360 Total Security False Malware Indication
« Last post by daniel_bingamon on March 14, 2017, 07:14:31 PM »
Thanks for the comments.  I do have the debugger turned on, I'll try turning it off.
I'll look into the other stuff as well.
5
Windows questions / Re: 360 Total Security False Malware Indication
« Last post by TimoVJL on March 13, 2017, 01:45:55 PM »
- sometimes debug-info gives false alarms.
- using MT multithreaded CRT gives less false alarms.
6
Windows questions / Re: 360 Total Security False Malware Indication
« Last post by jj2007 on March 13, 2017, 12:36:10 PM »
It is listing HEUR/QVM20.1.55BF.Malware.Gen.

Don't worry, your program is fine - this is just a false positive from a crappy AV. There is a dedicated sub-forum over at the Masm32 site. These guys should be thrown in jail for the damage they are causing.

If you need to convince your end user, upload your file to https://virusscan.jotti.org/en-US/scan-file and show the result to that user. Or point them to False Positives Sink Antivirus Ratings (360 crapware is not even listed there).

Typical result for my RichMasm editor: Scan finished. 2/18 scanners reported malware - probably because it's a packed executable, really, really suspicious 8)
7
Windows questions / 360 Total Security False Malware Indication
« Last post by daniel_bingamon on March 13, 2017, 12:12:59 PM »
I use this compiler on a regular basic and just recently a program I wrote a long time ago was reported to have malware.  Now, the .zip file is the same file I uploaded to my website, I thought maybe someone got into it and add some malware payload.   So, I made a totally new compilation with a couple bug fixes while I was in the code and made a new zip and uploaded it to the site.     This ONLY occurs with 360 Total Security Antivirus, which an end user is using.

BTW - My desktop is secured with ESET NOD32 and is running fine with no indications of virus.  I'm reasonably sure the PC is not infected.

It is listing HEUR/QVM20.1.55BF.Malware.Gen.

Is it possible that one of the Pelles Libraries code has been used by someone making malware and this section of library is being used as the signature?
I can't get an answer back (two email) from the 360 Total Security people, they are ignoring my requests.

The program TWCalc (for calculating toneholes on Pennywhistles) is here:  http://kingsmills.us/twcalc/twcalc.htm
I don't understand why this is happening, there is no intent to have any malware in this.
8
Windows questions / Re: Change default installation directory - Problem
« Last post by syntel on March 13, 2017, 06:31:51 AM »
Those are not PellesC files.
Same old time stamp in every file.

Could you zip that stralign.h for us ?
Just to guess where it came from.

Hi Timo:

   Sorry I can't zip it because I now only have the listing itself as a .txt file. But the file and all the others *appeared* in my *empty* C:\pellesc\include\win\ sub-dir only *after* I ran the setup.exe. So they came into being via the running of setup.exe.  And I can't re-create the conditions the resulted in stralign.h

  Also, we finished building our latest version of xHarbour today under PellesC Version 8, and it is now published on our repository for the Harbour language (www.whosaway.com).  The only change we had to make was to substitute the 'Make' utility from Visual C 2015 (nmake.exe) to replace pomake.exe   Pomake causes our 'build' to crash in the late stages of building.  Using the Visual C make utility corrects this problem.

btw, our next task is to wrestle with the recent version of Visual C (VC2015) installed also on my route drive as c:\VC2015>.  We have it installed, but it, too, crashes while starting to build xHarbour. We used to have older versions of PellesC and Visual C on our system, and they worked correctly in building xHarbour. But now we have these current problems. Keeps us busy !

xHarbour can be thought of as Hi-C type of language, and is somewhat like Python. But, to us, much more powerful and with more clarity. Started in 1999 and still growing.
 
Thanks again for your help and we'll try again to use POMAKE in our building process when we have time to re-test.!

-Mel Smith

9
Windows questions / Re: Change default installation directory - Problem
« Last post by TimoVJL on March 12, 2017, 07:49:30 PM »
Those are not PellesC files.
Same old time stamp in every file.

Could you zip that stralign.h for us ?
Just to guess where it came from.
10
Windows questions / Re: Change default installation directory - Problem
« Last post by syntel on March 12, 2017, 06:29:02 PM »
:D :D :D

Hi Frankie:

  Below is the *older* and incorrect listing of my c:pellesc\include\win sub-directory with stralign.h in it.

  I kept getting the same contents after each uninstall and re-install to the c:\pellesc> directory UNTIL I installed in c:\progra~2\Pellesc, then uninstalled and did the Registry Cleaning.  Prior to this I did my own 'scrubbing' of the registry.


  Anyway, please note the time, and dates numbers of files (129 instead of 344)  in the listing *and* the presence of stralign.h

****** listing of c:\pellesc\include\win sub-dir ****
 Volume in drive C is OS
 Volume Serial Number is 0884-CE9F

 Directory of C:\PELLESC\Include\win

04/12/2014  04:55 AM               410 sac.h
04/12/2014  04:55 AM            45,876 sal.h
04/12/2014  04:55 AM             2,231 sal_supp.h
04/12/2014  04:55 AM           826,506 sapi.h
04/12/2014  04:55 AM           708,293 sapi51.h
04/12/2014  04:55 AM           819,267 sapi53.h
04/12/2014  04:55 AM           146,299 sapiddk.h
04/12/2014  04:55 AM           103,165 sapiddk51.h
04/12/2014  04:55 AM               402 sas.h
04/12/2014  04:55 AM           109,939 sbe.h
04/12/2014  04:55 AM             5,593 sberrors.h
04/12/2014  04:55 AM           127,573 sbtsv.h
04/12/2014  04:55 AM               550 scarddat.h
04/12/2014  04:55 AM            14,666 scarderr.h
04/12/2014  04:55 AM               550 scardmgr.h
04/12/2014  04:55 AM               550 scardsrv.h
04/12/2014  04:55 AM           131,530 scardssp.h
04/12/2014  04:55 AM             2,335 scclient.h
04/12/2014  04:55 AM            13,627 scesvc.h
04/12/2014  04:55 AM            30,397 schannel.h
04/12/2014  04:55 AM             2,284 schedule.h
04/12/2014  04:55 AM             5,270 SchemaDef.h
04/12/2014  04:55 AM               615 schnlsp.h
04/12/2014  04:55 AM               344 scode.h
04/12/2014  04:55 AM             8,752 scrnsave.h
04/12/2014  04:55 AM               747 scrptids.h
04/12/2014  04:55 AM             3,011 scserver.h
04/12/2014  04:55 AM            13,207 sddl.h
04/12/2014  04:55 AM             9,244 sdkddkver.h
04/12/2014  04:55 AM            89,946 sdoias.h
04/12/2014  04:55 AM            97,533 sdpblb.h
04/12/2014  04:55 AM             2,491 sdperr.h
04/12/2014  04:55 AM               635 sdv_driverspecs.h
04/12/2014  04:55 AM           204,620 searchapi.h
04/12/2014  04:55 AM             4,506 secext.h
04/12/2014  04:55 AM             1,744 security.h
04/12/2014  04:55 AM           721,926 segment.h
04/12/2014  04:55 AM               640 sehmap.h
04/12/2014  04:55 AM             2,245 sens.h
04/12/2014  04:55 AM             1,419 sensapi.h
04/12/2014  04:55 AM            27,095 sensevts.h
04/12/2014  04:55 AM            33,928 sensors.h
04/12/2014  04:55 AM            41,225 sensorsapi.h
04/12/2014  04:55 AM             7,998 servprov.h
04/12/2014  04:55 AM             7,582 SessdirPublicTypes.h
04/12/2014  04:55 AM           216,145 setupapi.h
04/12/2014  04:55 AM             1,102 setupdd.h
04/12/2014  04:55 AM             1,693 sfc.h
04/12/2014  04:55 AM            23,768 shappmgr.h
04/12/2014  04:55 AM           175,729 shdeprecated.h
04/12/2014  04:55 AM             3,558 shdispid.h
04/12/2014  04:55 AM            70,560 shellapi.h
04/12/2014  04:55 AM            11,185 sherrors.h
04/12/2014  04:55 AM             3,425 shfolder.h
04/12/2014  04:55 AM            11,453 shidfact.h
04/12/2014  04:55 AM            22,521 ShImgData.h
04/12/2014  04:55 AM           263,795 shldisp.h
04/12/2014  04:55 AM            46,571 shlguid.h
04/12/2014  04:55 AM           214,146 shlobj.h
04/12/2014  04:55 AM           120,453 shlwapi.h
04/12/2014  04:55 AM         1,104,203 ShObjIdl.h
04/12/2014  04:55 AM            14,350 shtypes.h
04/12/2014  04:55 AM            19,764 simpdata.h
04/12/2014  04:55 AM             5,206 simpdc.h
04/12/2014  04:55 AM               630 sipbase.h
04/12/2014  04:55 AM             3,426 sisbkup.h
04/12/2014  04:55 AM            70,473 slerror.h
04/12/2014  04:55 AM               846 sliddefs.h
04/12/2014  04:55 AM            10,003 slpublic.h
04/12/2014  04:55 AM             1,316 smpab.h
04/12/2014  04:55 AM             1,975 smpms.h
04/12/2014  04:55 AM             3,861 smpxp.h
04/12/2014  04:55 AM             7,311 SmtpGuid.h
04/12/2014  04:55 AM            14,222 smx.h
04/12/2014  04:55 AM            24,215 snmp.h
04/12/2014  04:55 AM            12,865 SoftPub.h
04/12/2014  04:55 AM             3,105 spapidef.h
04/12/2014  04:55 AM            34,295 spcollec.h
04/12/2014  04:55 AM            29,263 spddkhlp.h
04/12/2014  04:55 AM            23,378 specstrings.h
04/12/2014  04:55 AM             1,945 specstrings_adt.h
04/12/2014  04:55 AM            60,323 specstrings_strict.h
04/12/2014  04:55 AM             2,952 specstrings_supp.h
04/12/2014  04:55 AM            10,943 specstrings_undef.h
04/12/2014  04:55 AM            34,078 sperror.h
04/12/2014  04:55 AM            29,681 speventq.h
04/12/2014  04:55 AM            91,844 sphelper.h
04/12/2014  04:55 AM             1,497 sporder.h
04/12/2014  04:55 AM             8,143 spuihelp.h
04/12/2014  04:55 AM            33,200 sql.h
04/12/2014  04:55 AM            91,320 sqlext.h
04/12/2014  04:55 AM            26,183 sqloledb.h
04/12/2014  04:55 AM             7,556 sqltypes.h
04/12/2014  04:55 AM            28,623 sqlucode.h
04/12/2014  04:55 AM             4,065 sql_1.h
04/12/2014  04:55 AM             5,494 SrRestorePtApi.h
04/12/2014  04:55 AM            16,476 srv.h
04/12/2014  04:55 AM               666 sspguid.h
04/12/2014  04:55 AM            94,555 sspi.h
04/12/2014  04:55 AM               869 sspserr.h
04/12/2014  04:55 AM               386 sspsidl.h
04/12/2014  04:55 AM             6,184 statusdeviceservice.h
04/12/2014  04:55 AM             2,338 stgprop.h
04/12/2014  04:55 AM            27,500 sti.h
04/12/2014  04:55 AM             4,290 stierr.h
04/12/2014  04:55 AM             2,762 stireg.h
04/12/2014  04:55 AM               816 stllock.h
04/12/2014  04:55 AM             9,113 stm.h
04/12/2014  04:55 AM               563 storage.h
04/12/2014  04:55 AM             2,690 storprop.h
04/12/2014  04:55 AM            16,057 StrAlign.h  ******** here it is ********
04/12/2014  04:55 AM            44,338 streamcache.h
04/12/2014  04:55 AM            47,373 streamdescription.h
04/12/2014  04:55 AM           736,361 strmif.h
04/12/2014  04:55 AM            14,940 strongname.h
04/12/2014  04:55 AM           329,302 strsafe.h
04/12/2014  04:55 AM            86,973 structuredquery.h
04/12/2014  04:55 AM            25,746 structuredquerycondition.h
04/12/2014  04:55 AM            12,650 subauth.h
04/12/2014  04:55 AM            41,351 subscriptionservices.h
04/12/2014  04:55 AM            40,827 subsmgr.h
04/12/2014  04:55 AM            18,955 svcguid.h
04/12/2014  04:55 AM            47,088 svrapi.h
04/12/2014  04:55 AM             4,246 syncdeviceservice.h
04/12/2014  04:55 AM             8,117 synchronizationerrors.h
04/12/2014  04:55 AM           133,219 syncmgr.h
04/12/2014  04:55 AM             5,288 syncop.h
04/12/2014  04:55 AM            51,453 syncregistration.h
04/12/2014  04:55 AM             2,282 syncregistrationerrors.h
             129 File(s)      9,223,198 bytes
               0 Dir(s)  230,676,541,440 bytes free

******************************************
Pages: [1] 2 3 ... 10