Search found 331 matches
- Sat Mar 09, 2024 7:53 pm
- Forum: Coding Questions
- Topic: How can I retrieve the netcard gateway?
- Replies: 10
- Views: 293
Re: How can I retrieve the netcard gateway?
Thank you breeze4me, your code has been very helpful! I also wanted to thank idle and HeX0R for their contributions.
- Sat Mar 09, 2024 3:13 am
- Forum: Coding Questions
- Topic: How can I retrieve the netcard gateway?
- Replies: 10
- Views: 293
Re: How can I retrieve the netcard gateway?
doesn't my code above print the gateway ? Name {0CA112EB-9D58-4953-A09A-A3EFFC0CB6E9} Description Intel(R) Wi-Fi 6 AX200 160MHz DHCP 1 Address 192.168.1.2 Mask 255.255.255.0 Gateway 192.168.1.1 Index 3 mac address A4:EF:C8:BE:3C:2D DHCP: LeaseObtained 09.03.2024 11:39:21 DHCP: LeaseExpires 10.03.20...
- Sat Mar 09, 2024 2:37 am
- Forum: Coding Questions
- Topic: How can I retrieve the netcard gateway?
- Replies: 10
- Views: 293
Re: How can I retrieve the netcard gateway?
I tried to simplify as much as possible to be able to post an example here. What I would expect to get is a decimal version of the Gateway IP, but unfortunately, I only get a memory access error. What am I doing wrong? Do you have any suggestions to offer? Thank you. #IF_TYPE_ETHERNET_CSMACD = 6 #MA...
- Fri Mar 08, 2024 11:10 pm
- Forum: Coding Questions
- Topic: How can I retrieve the netcard gateway?
- Replies: 10
- Views: 293
Re: How can I retrieve the netcard gateway?
Hi, Unfortunately, the issue persists and it's still not possible to retrieve the gateway. In my version, I've implemented these structures. Can you tell me if they seem valid to you? Structure IP_ADAPTER_ADDRESSES Length.l ; unsigned IfIndex.l *Next.IP_ADAPTER_ADDRESSES *AdapterName *FirstUnicastAd...
- Fri Mar 08, 2024 9:07 pm
- Forum: Coding Questions
- Topic: How can I retrieve the netcard gateway?
- Replies: 10
- Views: 293
How can I retrieve the netcard gateway?
On the German section of the forum, I came across the following post: https://www.purebasic.fr/german/viewtopic.php?p=258815#p258815 In this example, the network card's gateway is not being returned. How can one retrieve it? Additionally, I've noticed that the "IP_ADAPTER_GATEWAY_ADDRESS_LH&quo...
- Fri Aug 11, 2023 7:22 pm
- Forum: Windows
- Topic: Conversion from C
- Replies: 4
- Views: 1120
Re: Conversion from C
Ok thanks again!
- Fri Aug 11, 2023 6:24 pm
- Forum: Windows
- Topic: Conversion from C
- Replies: 4
- Views: 1120
Re: Conversion from C
Thanks Mijikai! Ok your version works well but why in the fillconsoleoutputcharacter you have inserted at the last two parameters a #Null and @csbi? If I read here (https://learn.microsoft.com/en-us/windows/console/fillconsoleoutputcharacter): BOOL WINAPI FillConsoleOutputCharacter( _In_ HANDLE hCon...
- Fri Aug 11, 2023 3:33 pm
- Forum: Windows
- Topic: Conversion from C
- Replies: 4
- Views: 1120
Conversion from C
Hi, This code in C clear the console: #include <windows.h> void ClearScreen() { HANDLE hStdOut; CONSOLE_SCREEN_BUFFER_INFO csbi; DWORD count; DWORD cellCount; COORD homeCoords = { 0, 0 }; hStdOut = GetStdHandle( STD_OUTPUT_HANDLE ); if (hStdOut == INVALID_HANDLE_VALUE) return; /* Get the number of c...
- Tue Sep 20, 2022 4:08 pm
- Forum: Coding Questions
- Topic: A bug in SortArray?
- Replies: 10
- Views: 556
Re: A bug in SortArray?
Ok thanks to all!
- Tue Sep 20, 2022 2:14 pm
- Forum: Coding Questions
- Topic: A bug in SortArray?
- Replies: 10
- Views: 556
Re: A bug in SortArray?
PB DIM always + one extra item The problem is not the Dim but the extra element that is also ordered and inserted in the resulting sorted array But if you are going to argue and you belief it's a bug GO and post a Bug report In the "Bugs" section of the forum I read that first I have to p...
- Tue Sep 20, 2022 1:48 pm
- Forum: Coding Questions
- Topic: A bug in SortArray?
- Replies: 10
- Views: 556
Re: A bug in SortArray?
From the PureBasic manual on SortArray() parameters: "Start, End (optional) The index of the first and last element in the array that should be sorted. If these parameters are not specified, then the whole array is sorted. " As I understand it the whole array is the one without the extra v...
- Tue Sep 20, 2022 1:22 pm
- Forum: Coding Questions
- Topic: A bug in SortArray?
- Replies: 10
- Views: 556
Re: A bug in SortArray?
Hi Reshad, Seems that an extra value is allways inserted in the array with value 0 after the sort. look this: Dim numbers.a(4) numbers(0) = 4 numbers(1) = 3 numbers(2) = 1 numbers(3) = 2 SortArray(numbers(),#PB_Sort_Ascending,0,3) For i = 0 To 4 Debug Str(numbers(i)) Next i I was expected an error b...
- Tue Sep 20, 2022 1:08 pm
- Forum: Coding Questions
- Topic: A bug in SortArray?
- Replies: 10
- Views: 556
A bug in SortArray?
Hi
I was expected an output like:
1
2
3
4
but the result is:
0
1
2
3
I used PureBasic 6.0 LTS
Code: Select all
Dim numbers.a(4)
numbers(0) = 4
numbers(1) = 3
numbers(2) = 1
numbers(3) = 2
SortArray(numbers(),#PB_Sort_Ascending)
For i = 0 To 3
Debug Str(numbers(i))
Next i
1
2
3
4
but the result is:
0
1
2
3
I used PureBasic 6.0 LTS
- Tue Mar 01, 2022 10:36 am
- Forum: Announcement
- Topic: PureBasic 6.00 released !
- Replies: 626
- Views: 148306
Re: PureBasic 6.00 Beta 4 released !
Thanks! I will try to catch the "bug" with this.juergenkulow wrote: ↑Mon Feb 28, 2022 3:31 am I hope with the solution of OnError lib not working / triggering also the error in the optimized compilation under C backend can be found in your program.
- Sun Feb 27, 2022 4:09 pm
- Forum: Announcement
- Topic: PureBasic 6.00 released !
- Replies: 626
- Views: 148306