Tag Archives: programming
Get MAC Address with C#

public string GetLocalIPAddress() { foreach (NetworkInterface NetI in NetworkInterface.GetAllNetworkInterfaces()) { if (NetI.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 || NetI.NetworkInterfaceType == NetworkInterfaceType.Ethernet && NetI.OperationalStatus…

Get local IP address with C#

public string GetLocalIPAddress() { foreach (NetworkInterface NetI in NetworkInterface.GetAllNetworkInterfaces()) { if (NetI.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 || NetI.NetworkInterfaceType == NetworkInterfaceType.Ethernet && NetI.OperationalStatus…

How to get bios identifier with C#

public string GetBiosId() { try { string bios = ""; using (ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_BIOS")) {…

Explorer theme for ListView control

[DllImport("uxtheme.dll", CharSet = CharSet.Unicode)] public extern static int SetWindowTheme(IntPtr hWnd, string pszSubAppName, string pszSubIdList);   //overwrite control’s OnHandleCreated method protected…

Suppress all error messages in C

SetErrorMode function controls whether the system will handle the specified types of serious errors or whether the process will handle…

Create a process in C

#include <stdlib.h> #include <stdio.h> #include <windows.h>     int main() { STARTUPINFO startInfo; PROCESS_INFORMATION procInfo;   //lock user WCHAR cmd[50]…

List table columns in cakephp 3

List table columns $db = \Cake\Datasource\ConnectionManager::get(’default’); $collection = $db->schemaCollection(); $table= $collection->describe(’tablename’); $columns = $table->columns();$db = \Cake\Datasource\ConnectionManager::get(‘default’); $collection = $db->schemaCollection(); $table=…

Enable kernel debugging Windows 7

Run cmd as administrator. Execute command bcdedit /debug ONbcdedit /debug ON Execute command bcdedit /dbgsettings SERIAL DEBUGPORT:1 BAUDRATE:115200bcdedit /dbgsettings SERIAL…

Parsing JSON in C

jsmn is a minimalistic JSON parser in C. It can be easily integrated into the resource-limited projects or embedded systems….

How to overcome ERROR_INTERNET_INVALID_CA error in C

ERROR_INTERNET_INVALID_CA (12045) – The function is unfamiliar with the Certificate Authority that generated the server’s certificate. //… DWORD invalidcaFlags, invalidcaFlagsLen…

Previous Page · Next Page