HideousKojima
HideousKojima
CC#
Created by HideousKojima on 8/29/2023 in #help
❔ SOAP to HTTP question
Thanks for the help!
14 replies
CC#
Created by HideousKojima on 8/29/2023 in #help
❔ SOAP to HTTP question
Won't be the first or last time I see that with some of the stuff I've been tasked with porting/updating here, unfortunately
14 replies
CC#
Created by HideousKojima on 8/29/2023 in #help
❔ SOAP to HTTP question
The weird thing is that this old codebase is relatively new haha. It's definitely had work done on it within the last 5 years
14 replies
CC#
Created by HideousKojima on 8/29/2023 in #help
❔ SOAP to HTTP question
At least according to the docs it's been arround since .NET Framework 1.1 if not longer
14 replies
CC#
Created by HideousKojima on 8/29/2023 in #help
❔ SOAP to HTTP question
It's relatively simple, I'll do some more poking around and see what System.ServiceModel can do for me. Thanks!
14 replies
CC#
Created by HideousKojima on 8/29/2023 in #help
❔ SOAP to HTTP question
Correct
14 replies
CC#
Created by HideousKojima on 8/9/2023 in #help
❔ Proper way to do something in C# (migrating an old Visual Basic library)
Well I might be able to avoid using sizeof() entirely here. Turns out they were using that to calculate the byte number in the file to start the write at (using the old VB FileSystem.FilePut() method). Should be easy to do it cleaner and better with a Stream. Thanks for the help in figuring out what the hell they were doing in the first place haha
48 replies
CC#
Created by HideousKojima on 8/9/2023 in #help
❔ Proper way to do something in C# (migrating an old Visual Basic library)
I wish, at least they pay me well here haha
48 replies
CC#
Created by HideousKojima on 8/9/2023 in #help
❔ Proper way to do something in C# (migrating an old Visual Basic library)
I think
48 replies
CC#
Created by HideousKojima on 8/9/2023 in #help
❔ Proper way to do something in C# (migrating an old Visual Basic library)
I think they wanted to convert it to a hex value but wanted to make sure it actually has both digits if the leading digit is a 0
48 replies
CC#
Created by HideousKojima on 8/9/2023 in #help
❔ Proper way to do something in C# (migrating an old Visual Basic library)
That's right, they took a string, converted it to an integer (it was the old Conversions.ToInteger, I already changed that), then convert it to a char, then back to a string
48 replies
CC#
Created by HideousKojima on 8/9/2023 in #help
❔ Proper way to do something in C# (migrating an old Visual Basic library)
Here's a last little tidbit to blow your mind before I dive into this trash fire:
someString = Conversions.ToString(Strings.Chr(Convert.ToInt32(someString)))
someString = Conversions.ToString(Strings.Chr(Convert.ToInt32(someString)))
48 replies
CC#
Created by HideousKojima on 8/9/2023 in #help
❔ Proper way to do something in C# (migrating an old Visual Basic library)
They want to move some service to Azure Functions, but it turns out this library is one of said service's dependencies
48 replies
CC#
Created by HideousKojima on 8/9/2023 in #help
❔ Proper way to do something in C# (migrating an old Visual Basic library)
Guess I'd better find out if the stuff that depends on this is 32-bit or 64-bit, and if we can even change that without breaking all of the data that has already been stored
48 replies
CC#
Created by HideousKojima on 8/9/2023 in #help
❔ Proper way to do something in C# (migrating an old Visual Basic library)
Pretty much yeah, most of this appears to have been originally in VB6, I've found a bunch of comments left behind by an automatic VB6 to VB.NET conversion tool they used on it probably 20 years ago
48 replies
CC#
Created by HideousKojima on 8/9/2023 in #help
❔ Proper way to do something in C# (migrating an old Visual Basic library)
I wish it was black magic, it's definitely more spaghetti code here lol. A good chunk of what this library is doing is reading binary data from some files and databases, converting it to strings to use/manipulate/whatever (and ASCII only, I might need to add proper support for unicode) and then converting it back to byte arrays and saving it. They chose some of the most convoluted ways imaginable to do this though lol
48 replies
CC#
Created by HideousKojima on 8/9/2023 in #help
❔ Proper way to do something in C# (migrating an old Visual Basic library)
and sizeof only works in unsafe contexts unless you give it a predefined size, and I don't know what that predefiend size is "supposed" to be in the first place
48 replies
CC#
Created by HideousKojima on 8/9/2023 in #help
❔ Proper way to do something in C# (migrating an old Visual Basic library)
Well, looks likle I'm going to have to do some more untangling then since the line of code in question is used to change the value of an iterator for a loop
48 replies
CC#
Created by HideousKojima on 8/9/2023 in #help
❔ Proper way to do something in C# (migrating an old Visual Basic library)
I assume the pointer for a string reference is 4 bytes so it doesn't change anything?
48 replies
CC#
Created by HideousKojima on 8/9/2023 in #help
❔ Proper way to do something in C# (migrating an old Visual Basic library)
But only when I remove the comments on the VBFixedString(2) attributes, removing the comments on the VBFixedString(4) attribute doesn't change anything
48 replies