Dashboard

How do I handle such situation correctly?

How do I handle such situation correctly?

Not without doing some work, or copying the .Buffer to a PWSTR. It looks like NtfsOpenFile() passes the variable on to several functions that expect a PWSTR. What is the issue with leaving it as a ...

Not without doing some work, or copying the .Buffer to a PWSTR. It looks like NtfsOpenFile() passes the variable on to several functions that expect a PWSTR. What is the issue with leaving it as a PWSTR? That maybe the buffer won't be null-terminated? I can see that FullPath.Buffer will be, I'm not sure about FileObject->FileName.Buffer.

I agree that using GetBuffer() when reading is not pretty. However, original code almost never copied the arrays themselves and passed that local arrays around. Perhaps I don't need to copy them?

I agree that using GetBuffer() when reading is not pretty.
However, original code almost never copied the arrays themselves and passed that local arrays around.
Perhaps I don't need to copy them?

That's possible. But if not captured, then the user of this data buffer should use it within SEH block...

That's possible. But if not captured, then the user of this data buffer should use it within SEH block...

  • More
  • CR-120
  • finished reviewing
  • More
  • CR-122
  • resumed reviewing
This can be different per use case. If you need the buffer just to read from it, use GetString(), if you need the buffer to modify it, use GetBuffer() / ReleaseBuffer(). If you are going to pass t...

This can be different per use case.
If you need the buffer just to read from it, use GetString(), if you need the buffer to modify it, use GetBuffer() / ReleaseBuffer().

If you are going to pass the data to a control that holds on to it (lParam etc) you probably dont want to use a CString at all.

The reason I did use GetBuffer() is that some functions require LPWSTR and I did not want to use const_cast<LPWSTR>(). So you say casting is better?

The reason I did use GetBuffer() is that some functions require LPWSTR and I did not want to use const_cast<LPWSTR>().
So you say casting is better?

A generic note for CString: If you just want to access the raw string pointer (to read!), use GetString() instead of GetBuffer().

A generic note for CString: If you just want to access the raw string pointer (to read!), use GetString() instead of GetBuffer().

  • More
  • CR-122
  • finished reviewing
  • More
  • CR-123
  • finished reviewing
  • More
  • CR-121
  • finished reviewing
Samuel Serapion: You said you were working on a new patch, is the latest version attached here or do you have a new revision?

Samuel Serapion: You said you were working on a new patch, is the latest version attached here or do you have a new revision?

  • More
  • CR-120
  • finished reviewing
  • More
  • CR-122
  • finished reviewing
Jira cut off the url (already gave it in irc): https://git.reactos.org/?p=reactos.git;a=blob;f=reactos/dll/win32/browseui/explorerband.cpp;hb=6f6999647ab23b1ee53550b6f6196c912b03334a#l57

Jira cut off the url (already gave it in irc): https://git.reactos.org/?p=reactos.git;a=blob;f=reactos/dll/win32/browseui/explorerband.cpp;hb=6f6999647ab23b1ee53550b6f6196c912b03334a#l57

As you already found out, and what we overlooked was: The TBBUTTON struct treats this as opaque data, e.g. it does do nothing but store the raw value you pass it. (in our case, a pointer) So when f...

As you already found out, and what we overlooked was: The TBBUTTON struct treats this as opaque data, e.g. it does do nothing but store the raw value you pass it. (in our case, a pointer)
So when freeing this data, the pidl becomes invalid, and the button can no longer use it.

Yup... already solved... thanx for mentioning https://code.reactos.org/static/olpro3/2static/images/wiki/icons/emoticons/smile.gif

Yup... already solved... thanx for mentioning

Make sure you removed handling of button up/down window message handling, otherwise your toolbar won't send the message to the rebar. Also you may want to catch WM_NOTIFY instead, to know which bu...

Make sure you removed handling of button up/down window message handling, otherwise your toolbar won't send the message to the rebar.

Also you may want to catch WM_NOTIFY instead, to know which button is clicked

From specification: "Stopped - Short Packet Enable (SPE). Default = ‘0’. When set to ‘1’, the xHC may generate ..."

From specification: "Stopped - Short Packet Enable (SPE). Default = ‘0’. When set to ‘1’, the xHC may generate ..."

Latency?

Latency?

That's exactly what I needed, while Giannis had provided me a temporary working solution. Thanx https://code.reactos.org/static/olpro3/2static/images/wiki/icons/emoticons/smile.gif EDIT: Ahh, it i...

That's exactly what I needed, while Giannis had provided me a temporary working solution. Thanx

EDIT: Ahh, it indeed conflicts with ATL and all. Besides, I don't think including the entire header is a better alternative, just for this two macro definitions, right.

Hmm... I did that and I am getting Access violation errors and some other stuff. 0_o EDIT: Infact, CComHeapPtr caused problems in case of Left/Right clicks. In the case of handling the clicks, I u...

Hmm... I did that and I am getting Access violation errors and some other stuff. 0_o

EDIT: Infact, CComHeapPtr caused problems in case of Left/Right clicks. In the case of handling the clicks, I used to receive the pidls via dwdata member of TBBUTTON structure. And when I used the CComHeapPtr, as usual it used to auto destroy it. So whenever I clicked the button again (i.e internally the pidl is destroyed.) it gave me access violation errors and hang ups, just like in this case. 0_o The main culprit I guess depends on how TBButton structure handles that dwData member.

It should have been documented but I thought I could be lazy for such a small function. I fixed it now https://code.reactos.org/static/olpro3/2static/images/wiki/icons/emoticons/smile.gif

It should have been documented but I thought I could be lazy for such a small function. I fixed it now

Thank you, everyone, for giving a thorough review of the code. Helped a lot. Looking forward to similar and great feedback for the future revisions too. https://code.reactos.org/static/olpro3/2stat...

Thank you, everyone, for giving a thorough review of the code. Helped a lot. Looking forward to similar and great feedback for the future revisions too.

Hmm... I tried to test CISFBand::OnWinEvent() but it is not even called while the program is alive. (i.e. the control doesn't even reach that function when I click the button.) So how to make use o...

Hmm... I tried to test CISFBand::OnWinEvent() but it is not even called while the program is alive. (i.e. the control doesn't even reach that function when I click the button.) So how to make use of this function to avoid subclassing? Besides, how to know which click (left/mid/right) caused the WM_COMMAND? ;P

Pointless check (removed already)

Pointless check (removed already)

What you mean is aggregation but we tend to avoid it. it makes things confusing some times and on top of that our ATL doesn't support aggregation yet.

What you mean is aggregation but we tend to avoid it. it makes things confusing some times and on top of that our ATL doesn't support aggregation yet.

Quad not because of the size, but because of the word size. sizeof(WORD) = 2, sizeof(DOUBLEWORD) = 4, sizeof(QUADWORD) = 8. OK, it can be quite confusing!

Quad not because of the size, but because of the word size. sizeof(WORD) = 2, sizeof(DOUBLEWORD) = 4, sizeof(QUADWORD) = 8.
OK, it can be quite confusing!