Category Archives: Programming

Passing a ctypes array of struct from Python to .dll

I’m working on a small project that requires interfacing Python to a C .dll. I’ve never had to pass an array of structures by reference before with ctypes, so here’s a quick sanity check I did to make sure I … Continue reading

Posted in Hobbies, Programming, Technology | Leave a comment

Brief Example of Calling .dll Functions in C#

I don’t like C#, but the free version of Visual Studio only lets you use the interface builder in C#/.net programs, so here we are. My goal was to cheat and write the interesting parts of the program in C/C++, … Continue reading

Posted in Hobbies, Programming, Technology | Tagged , | Leave a comment

File Open Dialog Box in Python

I’m putting the finishing touches on a side project at work that requires opening a file as an argument at the command line, or through a file open dialog box. Here’s a snippet that demonstrates how I implemented it.   … Continue reading

Posted in Programming | Leave a comment

Summer Plans

My involvement with Mojo Frankenstein is taking up all my hobby energy lately. We’ve been at it for about a year now and have gigs booked on over half the weekends through the summer (and growing). I’ve been doing just … Continue reading

Posted in Hobbies, Programming, Technology | Leave a comment

Removing zeros from a Python tuple

I’ve been working with Python’s ctypes module to shuttle data back and forth with a Windows .dll. One of the arrays the .dll fills is pre-allocated, but not necessarily all used. So I’ll wind up with a tuple like this: … Continue reading

Posted in Programming | Leave a comment

Win32 and SFML noodling

I ran into a problem that I thought would be best solved by combining a prior UI framework and SFML. There are a zillion reasons you’d want to do this – if you need any kind of UI element (button, … Continue reading

Posted in Programming | Leave a comment

Initializing a C++ class with a reference to another class

I’ve been working on a small game that has a Player class and a Render class. The Render class needs to know about the Player class so that it can draw the player in the right spot. My first pass … Continue reading

Posted in Programming | 1 Comment