Questions tagged [lpstr]

21 questions
-1
votes
1 answer

How to match C++ LPSTR to C#

I'm actually learning C#/WPF and I wrote a library in C++. And I have a function that have an output parameter in LPSTR type, the test work well in C++ and I'm actually getting the right value I wanted with the right size. But in C# after importing…
-1
votes
1 answer

Cannot convert from lpstr to wchar_t

I got a piece of code from a Bluetooth example on the web, where we use a condition: ULONG NameToBthAddr(_In_ const LPWSTR pszRemoteName, _Out_ PSOCKADDR_BTH pRemoteBtAddr) { INT iResult = CXN_SUCCESS; BOOL …
user6812514
  • 49
  • 1
  • 7
-1
votes
1 answer

Re-sizing Image Using CDC

I am trying to write a component for my program to re-size image frames from a video. The current code is called, which takes the CDC from the current frame. void showImageFrame(LPSTR info) { BITMAPINFOHEADER * pInfo = (BITMAPINFOHEADER *)info; …
-1
votes
1 answer

File not saving lpstr contents

I have a small problem. I am trying to save some text from a Win32 Edit Control using fstream. My code: LPTSTR text = L""; ofstream file; GetDlgTextItem(hWnd, EDIT_MAIN, text, UINT_MAX); file.open(filePathName); file << text; file.close() If I…
Forrest4096
  • 159
  • 1
  • 8
-2
votes
2 answers

What is the lpstr filter for folders?

I am trying to open a dialog box where the user selects a certain folder on pure C++, no .Net framework or C#, and am struggling to find how the lpstr would filter everything but directories. I am currently using the OPENFILENAME function. I tried…
-3
votes
1 answer

Why are two strings with same content different while using wchar_t?

I am writing a code for comparing two strings of type LPSTR and wchar_t type. The contents of strings are same but the output is showing that the strings are different. Below is screenshot of the complete code. #include #include…
akashagrawal
  • 3
  • 1
  • 7
1
2