Re: Hoe Solve these errors?
the first argument of InternetOpen() is an address/pointer to the string, not a string
Re: Hoe Solve these errors?
Check your compilation settings, your are supposed to compile it in Unicode or ANSI mode.
Check this.
Re: Hoe Solve these errors?
Dear sirs,
Thank you for your reply.
After delete "L" from my code it compiled.
After that I tried build dll for that and when tried build that I met below errors:
1>------ Build started: Project: ExpertSample, Configuration: Debug Win32 ------
1>Linking...
1> Creating library .\Debug/ExpertSample.lib and object .\Debug/ExpertSample.exp
1>ExpertSample.obj : error LNK2019: unresolved external symbol __imp__InternetReadFile@16 referenced in function "int __stdcall Sample(int)" (?Sample@@YGHH@Z)
1>ExpertSample.obj : error LNK2019: unresolved external symbol __imp__HttpSendRequestA@20 referenced in function "int __stdcall Sample(int)" (?Sample@@YGHH@Z)
1>ExpertSample.obj : error LNK2019: unresolved external symbol __imp__HttpOpenRequestA@32 referenced in function "int __stdcall Sample(int)" (?Sample@@YGHH@Z)
1>ExpertSample.obj : error LNK2019: unresolved external symbol __imp__InternetCloseHandle@4 referenced in function "int __stdcall Sample(int)" (?Sample@@YGHH@Z)
1>ExpertSample.obj : error LNK2019: unresolved external symbol __imp__InternetConnectA@32 referenced in function "int __stdcall Sample(int)" (?Sample@@YGHH@Z)
1>ExpertSample.obj : error LNK2019: unresolved external symbol __imp__InternetOpenA@20 referenced in function "int __stdcall Sample(int)" (?Sample@@YGHH@Z)
1>.\Debug/ExpertSample.dll : fatal error LNK1120: 6 unresolved externals
1>Build log was saved at "file://c:\Users\Reza\Desktop\555\3\DLLSample\Debug\BuildLog.htm"
1>ExpertSample - 7 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I must add any linker to this?
How I can modify this?
Best Regards,
Re: Hoe Solve these errors?
Link your project with Wininet.lib
To do that, go to project settings, Linker, Input and put this library.
Re: Hoe Solve these errors?
dear Sirs,
Thank you for your reply.
Now it works.
Another question:
How I return "WebPage OutPut" in MessageBox or read that?
I mean how I can use that for example for printing or use in other section my program?
Thanks.
Re: Hoe Solve these errors?
I would suggest you to refrain from Internet programming, or anything extra-ordinary stuff. Learn basics of program compilation, linking, debugging, general problem solving. Develop normal console or GUI program for common needs.
Re: Hoe Solve these errors?
Quote:
Originally Posted by
Ajay Vijay
I would suggest you to refrain from Internet programming, or anything extra-ordinary stuff. Learn basics of program compilation, linking, debugging, general problem solving. Develop normal console or GUI program for common needs.
Dear Ajay,
thank you for your advise.
I am really beginner in this field and need this application for other my software.
This is my last problem for this work.
If possible help me I can solve this item.
Thanks.
Re: Hoe Solve these errors?
You can use the data represented by InternetReadFile and display it.
But what you should display? The retrieved content may just be HTML or some other gibberish that user won't understand. Would you write HTML parsing logic?
Re: Hoe Solve these errors?
Quote:
Originally Posted by
Ajay Vijay
You can use the data represented by InternetReadFile and display it.
But what you should display? The retrieved content may just be HTML or some other gibberish that user won't understand. Would you write HTML parsing logic?
Dear Ajay,
Thank you for your helping.
I want read only one number from my webpage.
My webpage address is: http://www.silverea.com/print.php
I want read this number and use that as int or double number.
I want use than this number for compare two number in my program.
Thank you for your helping again.