Re: GetMACAddress Crashes My App and VB IDE
From: Joseph Geretz (jgeretz_at_nospam.com)
Date: 02/01/05
- Next message: Daniel Crespo: "Set a custom page size"
- Previous message: alpine: "Re: window/form size greater than screen size"
- In reply to: Bob O`Bob: "Re: GetMACAddress Crashes My App and VB IDE"
- Next in thread: Joseph Geretz: "Re: GetMACAddress Crashes My App and VB IDE"
- Reply: Joseph Geretz: "Re: GetMACAddress Crashes My App and VB IDE"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Feb 2005 10:57:26 -0500
I'm such an IDIOT! I guess I can cut-and-paste OK, but I'm not too swift at
reading the documentation. One of the other developers found the description
of the problem.
Here's a snippet of instruction from Randy's page:
Note: There's something weird going on with this code and Native code
compiling. Specifically, the app will crash if the return data type from
GetRemoteMACAddress is changed to String . try and modify this code to
return a string from the user reported a weird problem I have confirmed
with this particular code code when compiled to an exe using the Native code
option. The problem stems (for some reason) in the assignment of compiling
and the assignment of a string return type to GetRemoteMACAddress. (Bugs in
applications compiled to Native code are not news nor uncommon). To remedy
this problem the code below sets the call's return type as Boolean rather
than string, and fills a string variable passed as a parameter with the
remote MAC address. These mods enable the code below to be successfully
executed in either a pcode or native code exe. Anyone interested in testing
this can affect this same crash by simply commenting out the
GetRemoteMACAddress=True and =False statements, redefine the function to As
String, and assign
OK, Randy. I can confirm that this is a problem :-) It also seems to occur
sporadically in the IDE.
I'll retool and report back when I've eliminated the problem.
- Joe Geretz -
"Bob O`Bob" <filterbob@yahoogroups.com> wrote in message
news:udgVva$BFHA.1404@TK2MSFTNGP11.phx.gbl...
> Joseph Geretz wrote:
>
>> The following function (See GetMACAddress below) is very closely related
>> to Randy Birch's function which I found at:
>>
>> http://vbnet.mvps.org/code/network/macaddressremote.htm
>>
>> (Thanks Randy!)
>>
>> The three primary differences to my derived method are as follows:
>>
>
>
> I'd suggest you grab Randy's code, first make sure it doesn't crash for
> you,
> then make modifications to it *one at a time* until it either crashes,
> or does everything you wanted from your version.
>
> Either way, you'll be ahead of where you are now.
>
>
>
> Bob
- Next message: Daniel Crespo: "Set a custom page size"
- Previous message: alpine: "Re: window/form size greater than screen size"
- In reply to: Bob O`Bob: "Re: GetMACAddress Crashes My App and VB IDE"
- Next in thread: Joseph Geretz: "Re: GetMACAddress Crashes My App and VB IDE"
- Reply: Joseph Geretz: "Re: GetMACAddress Crashes My App and VB IDE"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|