web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

DllImport user32.dll crash GP

(0) ShareShare
ReportReport
Posted on by

I am working on using a native windows API inside GP AddIns (c#). GP windows crashes once I move GP window. Any one has experience to address this issue?

[DllImport("user32.dll", EntryPoint = "SetWindowLong")]

       private static extern int SetWindowLong32(HandleRef hWnd, int nIndex, int dwNewLong);

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Josh P Profile Picture
    2,895 on at

    I do not think the dexterity wrapper likes you forcing things onto the forms using the Win API. If you must do this, try using  "SetWindowLongPtr." If my memory serves me, this method replaced the SetWindowLong for 64-bit systems, and you can also still use this for 32-bit applications too.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
mtabor Profile Picture

mtabor 1

#2
Victoria Yudin Profile Picture

Victoria Yudin 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans