Vijay Kiran Kamuju wrote:
case INTERNET_OPTION_ASYNC:
case INTERNET_OPTION_ASYNC_ID:
case INTERNET_OPTION_ASYNC_PRIORITY:
case INTERNET_OPTION_CALLBACK_FILTER:
case INTERNET_OPTION_CODEPAGE:
case INTERNET_OPTION_CONNECT_BACKOFF:
case INTERNET_OPTION_CONNECT_TIME:
case INTERNET_OPTION_DATA_RECEIVE_TIMEOUT:
case INTERNET_OPTION_DATA_SEND_TIMEOUT:
case INTERNET_OPTION_DISABLE_AUTODIAL:
case INTERNET_OPTION_DISCONNECTED_TIMEOUT:
case INTERNET_OPTION_IDLE_STATE:
case INTERNET_OPTION_KEEP_CONNECTION:
case INTERNET_OPTION_LISTEN_TIMEOUT:
case INTERNET_OPTION_OFFLINE_MODE:
case INTERNET_OPTION_OFFLINE_SEMANTICS:
case INTERNET_OPTION_POLICY:
case INTERNET_OPTION_RECEIVE_THROUGHPUT:
case INTERNET_OPTION_SEND_THROUGHPUT:
WARN("This request is not supported by native either\n");
You should print out the option being requested, otherwise the "This" in "This request" is meaningless. Just printing the option number is fine.
Hi, I have made changes, sending them soon. Dimitry: In your first suggestion, i think using a new variable is not a good idea. It has been done like that for all options and previously for the same options. next time i will think of something valid. In your third suggestion, you asked me not to set to 0, if set to 0xdeadbeef, that means i have to check for 0xdeadbeef. :(. when does API set its error to 0, what might be the cases generally. In your Last suggestion if i initialize the length variable in the tests, the native simply gives garbage, thats inorder to make the test pass.
Thanks for your suggestions, Vijay On 11/9/05, Robert Shearman rob@codeweavers.com wrote:
Vijay Kiran Kamuju wrote:
case INTERNET_OPTION_ASYNC:
case INTERNET_OPTION_ASYNC_ID:
case INTERNET_OPTION_ASYNC_PRIORITY:
case INTERNET_OPTION_CALLBACK_FILTER:
case INTERNET_OPTION_CODEPAGE:
case INTERNET_OPTION_CONNECT_BACKOFF:
case INTERNET_OPTION_CONNECT_TIME:
case INTERNET_OPTION_DATA_RECEIVE_TIMEOUT:
case INTERNET_OPTION_DATA_SEND_TIMEOUT:
case INTERNET_OPTION_DISABLE_AUTODIAL:
case INTERNET_OPTION_DISCONNECTED_TIMEOUT:
case INTERNET_OPTION_IDLE_STATE:
case INTERNET_OPTION_KEEP_CONNECTION:
case INTERNET_OPTION_LISTEN_TIMEOUT:
case INTERNET_OPTION_OFFLINE_MODE:
case INTERNET_OPTION_OFFLINE_SEMANTICS:
case INTERNET_OPTION_POLICY:
case INTERNET_OPTION_RECEIVE_THROUGHPUT:
case INTERNET_OPTION_SEND_THROUGHPUT:
WARN("This request is not supported by native either\n");
You should print out the option being requested, otherwise the "This" in "This request" is meaningless. Just printing the option number is fine.
-- Rob Shearman
On 11/9/05, Vijay Kiran Kamuju infyquest@gmail.com wrote:
In your third suggestion, you asked me not to set to 0, if set to 0xdeadbeef, that means i have to check for 0xdeadbeef. :(. when does API set its error to 0, what might be the cases generally.
You have to set the last error to a crazy value like 0xdeadbeef, because if you set the last error to something like 0, which is a possible error, there's always the possibility that wine will regress or a new version of the windows api might return 0 and you would never know. That's why you have to set the last error to a value that can't possibly be a result of GetLastError so you always know when the value changes and when it doesn't.
In your Last suggestion if i initialize the length variable in the tests, the native simply gives garbage, thats inorder to make the test pass.
Sounds like you need to add more tests then so you can understand the behavior of the function better. For what values of the length variable does native give garbage? I can't imagine an api that only works when one of the parameters is uninitialized.
-- James Hawkins
I tried in test program initilizing the length varaible like DWORD len=0; Then its giving me garbage, didnt try other possibilities. Thanks, Vijay
On 11/9/05, James Hawkins truiken@gmail.com wrote:
On 11/9/05, Vijay Kiran Kamuju infyquest@gmail.com wrote:
In your third suggestion, you asked me not to set to 0, if set to 0xdeadbeef, that means i have to check for 0xdeadbeef. :(. when does API set its error to 0, what might be the cases generally.
You have to set the last error to a crazy value like 0xdeadbeef, because if you set the last error to something like 0, which is a possible error, there's always the possibility that wine will regress or a new version of the windows api might return 0 and you would never know. That's why you have to set the last error to a value that can't possibly be a result of GetLastError so you always know when the value changes and when it doesn't.
In your Last suggestion if i initialize the length variable in the tests, the native simply gives garbage, thats inorder to make the test pass.
Sounds like you need to add more tests then so you can understand the behavior of the function better. For what values of the length variable does native give garbage? I can't imagine an api that only works when one of the parameters is uninitialized.
-- James Hawkins
"Vijay Kiran Kamuju" infyquest@gmail.com wrote:
I have made changes, sending them soon. Dimitry: In your first suggestion, i think using a new variable is not a good idea. It has been done like that for all options and previously for the same options. next time i will think of something valid.
Actually it's a good idea to use new variable. It not only makes code much cleaner, it also helps to avoid possible not aligned accesses to the memory.
In your third suggestion, you asked me not to set to 0, if set to 0xdeadbeef, that means i have to check for 0xdeadbeef. :(.
Exactly, I don't see why that's a problem for you.
when does API set its error to 0, what might be the cases generally.
Any reason, welcome to the world of windows API.
In your Last suggestion if i initialize the length variable in the tests, the native simply gives garbage, thats inorder to make the test pass.
This might indicate that there is something wrong with your tests.
On 11/9/05, Dmitry Timoshkov dmitry@baikal.ru wrote:
"Vijay Kiran Kamuju" infyquest@gmail.com wrote:
I have made changes, sending them soon. Dimitry: In your first suggestion, i think using a new variable is not a good idea. It has been done like that for all options and previously for the same options. next time i will think of something valid.
Actually it's a good idea to use new variable. It not only makes code much cleaner, it also helps to avoid possible not aligned accesses to the memory.
In your third suggestion, you asked me not to set to 0, if set to 0xdeadbeef, that means i have to check for 0xdeadbeef. :(.
Exactly, I don't see why that's a problem for you.
when does API set its error to 0, what might be the cases generally.
Any reason, welcome to the world of windows API.
In your Last suggestion if i initialize the length variable in the tests, the native simply gives garbage, thats inorder to make the test pass.
I too dont know much about how use the wininet apis, i just wrote a simple test prog to get test it, if you have any full pledged program source code. please send me that. i would like to experiment on it.
This might indicate that there is something wrong with your tests.
-- Dmitry.
"Vijay Kiran Kamuju" infyquest@gmail.com wrote:
In your Last suggestion if i initialize the length variable in the tests, the native simply gives garbage, thats inorder to make the test pass.
I too dont know much about how use the wininet apis, i just wrote a simple test prog to get test it, if you have any full pledged program source code. please send me that. i would like to experiment on it.
I just have read MSDN description of InternetQueryOption, nothing more. In your try4 you still forget to initialize buffer length before InternetQueryOption calls, and do not check buffer length in the implementation of INTERNET_OPTION_USER_AGENT.
About uninitalizing the length variable, if the tests bomb in windows, dont ask me. well i will put them in anew patch once this gets accepted. i have still some more tests and implementation to go. This is just the beggining. Thanks, Vijay
PS: ----- Why this always happens to me :( .
On 11/9/05, Dmitry Timoshkov dmitry@baikal.ru wrote:
"Vijay Kiran Kamuju" infyquest@gmail.com wrote:
In your Last suggestion if i initialize the length variable in the tests, the native simply gives garbage, thats inorder to make the test pass.
I too dont know much about how use the wininet apis, i just wrote a simple test prog to get test it, if you have any full pledged program source code. please send me that. i would like to experiment on it.
I just have read MSDN description of InternetQueryOption, nothing more. In your try4 you still forget to initialize buffer length before InternetQueryOption calls, and do not check buffer length in the implementation of INTERNET_OPTION_USER_AGENT.
-- Dmitry.