<div dir="ltr">Hi there,<div><br></div><div>As I promised, I created a new set of patches. You can find it</div><div>attached to this e-mail.</div><div><br></div><div>Here is a list with the changes I did after the feedback:</div><div>- initialized the internal variables (patch 06)</div><div>- moved the <b>WSACleanup</b> call from patch 06 to patch 12</div><div>- removed the implementation of my internal <b>getLastError</b> and started using <span style="font-size:12.8000001907349px"><b>qt_error_string</b> (patch 11)</span></div><div>- used <b>WSAAddressToStringW</b> instead of <b>WSAAddressToStringA</b> (patch 11)</div><div>- avoided some code duplication (patches 14, 15, 17)</div><div><br></div><div>I hope that I covered all of Thiago's suggestions.</div><div><br></div><div>You should know that I didn't call <b>WSACleanup</b> if the</div><div><b>WSAStartup</b> failed because this call was already made in the </div><div><b>BtDeviceSelectionDialog</b> destructor and I didn't know exactly<br></div><div>how I should handle this elegantly :).</div><div><br></div><div>Also I didn't remove the call of strdup method from </div><div><b>qtserialbluetooth::qt_serial_open </b>because the </div><div><b>WSAStringToAddressA</b> method is expecting to receive</div><div>LPSTR {aka char*} parameter while I have the address</div><div>represented as const char*.</div><div><br></div><div>I tried as well to replace the WSAStringToAddressA with</div><div>WSAStringToAddressW but I had to represent the</div><div>address as a wchar_t* and and when I wanted to use</div><div>mbstowcs_s for conversion (from const char* to wchar_t*) </div><div>the compiler couldn't find the declaration to the method </div><div>(even though I included the stdlib header). After some </div><div>failed attempts I gave up :).</div><div><br></div><div>Cheers,</div><div>Claudiu</div><div><br></div></div>