Category : windows

#include <Shlobj.h> #include <iostream> #include <string> std::string fun(REFKNOWNFOLDERID val) { ITEMIDLIST* pIDList; if (S_OK == SHGetKnownFolderIDList (val, 0, NULL, & pIDList)) { char cpath[MAX_PATH] = {0}; if (TRUE == SHGetPathFromIDList(pIDList, cpath)) return cpath; } return "failed"; } int main() { std::cout << "–> " << fun(FOLDERID_ProgramFiles) << std::endl; std::cout << "–> " << fun(FOLDERID_ProgramFilesX86) << ..

Read more

I’m trying to communicate with an Arduino via serial with Python and I keep getting this error: AttributeError: ‘Serial’ object has no attribute ‘write’ This doesn’t just happen with the write method, it also happens with read(). I’ve used this serial module before an have not experienced any of these problems. Strangely enough, it has ..

Read more

I’m trying to communicate with an Arduino via serial with Python and I keep getting this error: >PS C:DevelopmentAllenInterface> python3 .test.py Traceback (most recent call last): File "C:DevelopmentAllenInterfacetest.py", line 11, in <module> ser.write([0, 0]) AttributeError: ‘Serial’ object has no attribute ‘write’ This doesn’t just happen with the write method, it also happens with read(). I’ve ..

Read more